Caching views for a limited time only
See original GitHub issueAs far as I understand, I can use res.render(fileName, {"cache": true, "data" : data});
to cache a view, right?
However, since data may change on my views regularly, it doesn’t make sense for me to cache the view for a long period of time. However, I guess that caching it for short periods of time could still improve the performance of my application (if I have a lot concurrent request).
Is there any way I could make EJS cache the template/view for say 5 sec. and then render it once an cache it again for 5 seconds?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Guide for Caching and HTTP Cache Headers for Static Content
It reduces the time it takes for the user to view the images or Javascript or CSS ... Only the end user can...
Read more >What is Caching and How it Works - AWS
In addition, when local caches are used, they only benefit the local application consuming the data. In a distributed caching environment, the data...
Read more >Everything You Ever Wanted To Know About View Caching In ...
However, loading it up a second time only takes a few milliseconds because everything inside the cache do block is fetched from the...
Read more >What is Time to Live (TTL) | TTL Best Practices | CDN Guide
Time to live (TTL) is the time that an object is stored in a caching system before it's deleted or refreshed. In the...
Read more >HTTP caching - MDN Web Docs
Cache busting is a technique to make a response cacheable over a long period by changing the URL when the content changes. The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yup, since I’m already using an NGINX reverse proxy, I guess caching with NGINX is the way to go.
Thanks for the quick help.
@mitomm Does this answer your question? If so, please close.