RE: How to implement custom service layer cache using MultiVMPool ?

Vishnu S Kumar, modified 6 Years ago. Regular Member Posts: 131 Join Date: 7/28/17 Recent Posts
ref: https://liferay.dev/blogs/-/blogs/liferay-caching-service-level-caching-using-webcachepool.   
​​​​​​​According to this blog,  WebCachePool  internally uses SingleVMPool.  I'm looking for a similar approach which is suitable for Multi-node environment.
Thanks!
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
Here's the code for WebCachePool:
https://github.com/liferay/liferay-portal/blob/7.2.x/portal-impl/src/com/liferay/portal/webcache/WebCachePoolImpl.java
But honestly speaking, I never found the interface of the WebCachePool very convenient. I usually just use a simpler implementation with put /get. It is often inconvenient to create a WebCacheItem. But that's just an opinion.
Vishnu S Kumar, modified 6 Years ago. Regular Member Posts: 131 Join Date: 7/28/17 Recent Posts
Christoph Rabel:

Here's the code for WebCachePool:
https://github.com/liferay/liferay-portal/blob/7.2.x/portal-impl/src/com/liferay/portal/webcache/WebCachePoolImpl.java
But honestly speaking, I never found the interface of the WebCachePool very convenient. I usually just use a simpler implementation with put /get. It is often inconvenient to create a WebCacheItem. But that's just an opinion.

Thanks Christoph, It worked. We are using WebCacheItem to set different refresh time for each cached item.