My First Bike Had a Wooden Wheel

What we lose when we become adults isn’t just innocence, but a certain type of freedom that innocence provides. My first bike had a wooden rim.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Rxjs data cache

A rxjs update to simple in-memory cache for Angular data-providers

In my recent article, I have described a convenient way of caching repeated data calls and its payload in a simple in-memory data cache. If you haven’t seen it and want to get the most out of this article, I suggest you give a read (the concept is pretty simple, so it shall be quick). The described concept is based on Angular 2+, but it can be easily adapted to any framework.

As a followup to the original article, in this one I’ll describe how to avoid keeping two types of caches: one for data and one for calls, by using rxjs in a slightly more advanced way.

To fully understand the use case of the described solution, please refer to the detail description placed in previous article.

A short description can also be found here:

In the original article, we have created 2 types of caches in our data-provider: observable and data cache, just like that:

Add a comment

Related posts:

Stop Telling Me to Color

I tried to make it work, but like wearing someone else’s shoes, it never quite fit the way it was supposed to. A few years ago, everyone I knew was getting on the adult color book bandwagon. They…

Orwellian Pig Pen Politics On Parade

Rudeness is the weak man’s imitation of strength. “Orwellian Politics on Parade.” The idiocy of American debates. Trump is the rudest crudest of leaders.

How To Speak About Active Participation

The self talk in my head was more like, I want you to…I need you to want me. That was that was my approach. I need you to want me. And now my approach is, I want you, do you want me? Good. You don’t…