cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Externalizing hybris cache

arvind-kumar_avinash
Active Contributor
0 Likes
1,504

Has anyone experience with externalizing hybris cache? If yes, please share some pointers. The intent is to externalize caches held at individual nodes to a dedicated server. I do not see an issue externalizing query cache. However, I am concerned about entity cache which holds the non-serializable objects.

Accepted Solutions (1)

Accepted Solutions (1)

mpern
Product and Topic Expert
Product and Topic Expert
0 Likes

Since we are talking about PS Extensions already:

You are looking for the DTO cache extension:

https://wiki.hybris.com/display/hyps/DTO+Cache

It does not cache item types / entity caches, but the level above, the DTOs used to render a page. And those usually are generated via beans.xml and therefore serializable.

The package caches it in-memory (ehcache), but it shouldn't be too hard to externalize it.

I've used Redis in a different project successfully, we also cached DTOs (or parts of them that were expensive to compute or needed a lot of I/O to DB). But, to be clear, our solution was custom made and not based on the DTO cache. Redis also supports various data types (sets, maps, ...) that we used to make the caching a bit more intelligent, and not just a dumb key-value lookup.

Stock Levels for example can be easily externalized, if you treat Redis as write-through cache where writes/updates are still persisted to DB, but all lookups / calculations are based on the data in Redis. Same goes for Prices.

0 Likes

Hello mpern,

Could you please let me know the any documentation link for redis implementation

 

Thanks,

Mallik

Answers (1)

Answers (1)

Former Member
0 Likes

I'm not sure it will be easy, for me the hybris cache is in memory.

But it's possible I've seen that : https://wiki.hybris.com/display/hyps/Varnish+Cache

If you wan't a strong and safe implementation I guess you can buy an addon.