4 ms·
Out of curiosity, how do you do the caching? How long is the cache valid for? Is it only triggered by a user request, or is it updated by a cron job or similar
by LukeShu 10y ago
Out of curiosity, how do you do the caching? How long is the cache valid for? Is it only triggered by a user request, or is it updated by a cron job or similar?
- NKCSS 10y agoWebsite was written in C# (ASP.NET MVC); the data is cached in-memory on the webserver. I have caching limit (Like Count = 3 minutes, Page info (name, images, etc.) = 1 hour). Every time one of the resources is requested from the webserver; it's served from memory (initial retrieval on site start); and on access, it's checked how old the data is. If the data's older than the threshold, it's refreshed async and displayed on the next request.