Cache 404 responses #367
thomaswelton
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
We have a setup where Storyblok sits in front of an existing database driven set of landing pages. Storyblok allows our marketing team to create a new page item to customise it's content, but if the story does not exist we fall back to building that page using content from our database and our default template. There are about 350,000 pages total and only a small percentage of these currently exist on Storyblok.
One issue we're currently facing is that even though we are using the cache, a redis server and a custom cache config, we're still seeing a large amount of API calls to storyblok. These are coming from the long tail of content that is not present on Storyblok as currently a 404 response for a given
cvis not stored in the cache.Proposal
Cache the 404 response, and if found reject the
cacheResponsemethod early.I've put this proposal in the fork thomaswelton@15e3bfe
Would a feature such as this be considered? If so I'd be happy to work on this to look at adding tests or updating related documentation if required
Beta Was this translation helpful? Give feedback.
All reactions