Cache Invalidation Complexity: Rails 5.2 and Dalli Cache Store

Rails applications that use ActiveRecord objects in their cache may experience an issue where the entries cannot be invalidated if all of these conditions are true:

They are using Rails 5.2+
They have configured config.active_record.cache_versioning = true
They are using a cache that is not maintained by Rails, such as dalli_store

In this post, we discuss the background to a change in the way that cache keys work with Rails, why this change introduced an API incompatibility with third-party cache stores, and finally how you can find out if your app is at risk and how to fix it.


Render Caching for React

Server Side Rendering (SSR) is a very useful technique that makes web apps appear faster. The initial HTML is displayed before the JavaScript is parsed and, while the user is deciding what to tap on, our handlers are ready.
Server side rendering in React requires additional work to setup and has server costs. Furthermore, if your server team cannot have JavaScript running on your servers, you are stuck. It significantly complicates the CDN setup especially if you have pages that …
The post Render Caching for React appeared first on CSS-Tricks.


Web Caching Strategy

I am currently designing a high performant IoT solution for one of my clients. This system is also going to expose internal APIs to their clients so that they can build their systems/apps on top of it.
There will be web applications which means they will be consuming near-static/dynamic endpoints serving the data requirements. To reduce latency and enhance scalability, HTTP caching is one of the techniques I am proposing. In this article, I am going through some of the known terminologies which all of us think about while designing such systems.


The HTTP Series (Part 2): Architectural Aspects

In the first article of the series, we talked about the basic concepts of HTTP. Now that we have a foundation to build upon, we can talk about some of the architectural aspects of HTTP. There is more to HTTP than just sending and receiving data.
HTTP cannot function by itself as an application protocol. It needs infrastructure in the form of hardware and software solutions that provide different services and make communication over the World Wide Web possible and efficient.


The Impact of Web Caching

Try to remember something that happened on your last vacation. How long did it take you to recall? Now, try to remember it again. You were probably able to recall it faster the second time— but, why? This is because as soon as you recalled the event the first time, your brain saved the information to your recent memory.
The same concept applies to caching. Caching is a way of temporarily storing the contents of a webpage in locations near the user, similar to the way our memory works. There are several types of caching options available like database caching, application caching, distributed caching, etc. In this article, we’ll talk about web caching and how it affects user experience.


Here’s Why You Should Never Implement Your Own Caching

Here’s an interesting problem for you: build some simple caching.
Let’s say you have a server and an app. Your server has to do something every time you release a new app. Asking for reviews is a good example. If you automate this, everyone will be happier.


ASP.NET Core Response Cache

Where is the output cache in ASP.NET Core? Is it gone? No, it’s there but in new and better extensible form, and it is called now response caching. This blog post shows how to use response caching on ASP.NET Core and provides tips about some of the internals of it.

In ASP.NET Core caching is solved as a middleware service that comes with Microsoft.AspNetCore.ResponseCaching NuGet package. In MVC, caching is driven by the ResponseCache attribute. It’s possible to use the ResponseCache attribute without also response caching the middleware to just set response headers. This way, it is possible to tell the browser to cache content, and also cache or proxy servers on the way that can read these headers to find out how to cache page.