question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace client-side caching

See original GitHub issue

Replace 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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
poppastringcommented, May 25, 2022

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!

1reaction
zukomgwilicommented, May 25, 2022

Hi @poppastring. I’ve taken this issue and are looking at adding IMemoryCache to the ArchiveController. 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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found