Replace client-side caching
See original GitHub issueReplace client-side caching…
[ResponseCache(Duration = 14400, Location = ResponseCacheLocation.Any)]
…with serverside caching
private readonly IMemoryCache memoryCache;
- Caching on the home page should be broken when we add a new post or comment (includes status updates and deletes).
- Caching on the archive page should be broken when we add a new post.
- Caching on the category page should be broken when we add a new post.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Client-side caching in Redis
Client -side caching is a technique used to create high performance services. It exploits the memory available on application servers, servers that are...
Read more >Server-Side Caching vs. Client-Side Caching Explained
When it comes to client-side caching, the copy of the website stores in the browser's cache memory. When there's a request for that...
Read more >How We Applied Client-Side Caching to Improve Feature ...
We investigated the idea of adding a caching layer at the microservice level to achieve better request efficiency and ease the load on...
Read more >Is it possible to replace clients cached file in HTML
1 Answer 1 · Thank you. So I just need to change the script and style tag in the html file? Is the...
Read more >4 Client-Side Web Storage Options That Replace Cookies
4 Client-Side Web Storage Options That Replace Cookies · The CACHE section tells the browser which resources to cache for viewing offline. ·...
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
Hey @zukomgwili
The term “break” really means I want the cache invalidated so that it is removed from memory. In the BlogPostController you will see a private method called BreakSiteCache (which removes the cache key) and that invalidates the RSS and Front page cache when I add or edit a new post. That should serve as a good example if we create History for the History cache, we will want to break/invalidate its cache in the same way and at the same time.
As we have to do this in multiple places it may be a great time for some refactoring (based on your comfort level).
Send me PR and I will gladly review what you come up with and we can discuss it.
Thanks!
Hi @poppastring. I’ve taken this issue and are looking at adding
IMemoryCache
to theArchiveController
. Please can you help me understand what you mean by,Caching on the archive page should be broken when we add a new post.
, in the issue description above