Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching #120

Merged
merged 6 commits into from
Jun 20, 2023
Merged

Caching #120

merged 6 commits into from
Jun 20, 2023

Conversation

boazpoolman
Copy link
Member

@boazpoolman boazpoolman commented Jun 19, 2023

What does it do?

I've implemented a caching layer for sitemaps.
This cache is stored in the sitemap_cache table in the DB.
It stores the JSON representation of a sitemap.

As soon as a page gets edited, it will trigger a rebuild of the sitemap.
Instead of querying all (unedited pages) we will query the cache.
Then we'll query just the edited page and replace the old entry in the cache with the new.
Finally we will rebuild the sitemap XML based on the cache we just updated.

Why is it needed?

Fix performance issues

How to test it?

Install PR

Related issue(s)/PR(s)

#80, #83

@boazpoolman boazpoolman changed the title wip(cache): Basic cache implementation Caching Jun 19, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2023

Codecov Report

Patch coverage: 94.73% and project coverage change: +1.97 🎉

Comparison is base (aa04831) 89.02% compared to head (9fac109) 91.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #120      +/-   ##
==========================================
+ Coverage   89.02%   91.00%   +1.97%     
==========================================
  Files           2        2              
  Lines          82      100      +18     
  Branches       32       37       +5     
==========================================
+ Hits           73       91      +18     
  Misses          9        9              
Flag Coverage Δ
unit 91.00% <94.73%> (+1.97%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/utils/index.js 74.19% <94.73%> (+35.73%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@boazpoolman boazpoolman merged commit 9a4855c into master Jun 20, 2023
8 checks passed
@boazpoolman boazpoolman deleted the feature/cache branch June 20, 2023 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants