Cache Listener for Memcache

71 views
Skip to first unread message

Sweta Nahata

unread,
Jun 13, 2018, 12:45:08 AM6/13/18
to simple-spring-memecached
Hi,

EhCache has the capability of registering a cache listener for events such as put, get, evict, expired, update etc where as I don't see this capability with simple-spring-memcached. Can you let me know if there is a way to achieve this?

Thanks,
Sweta

Jakub Białek

unread,
Jun 13, 2018, 4:38:03 AM6/13/18
to simple-spring-memecached
Hi,

There isn't such functionality in SSM. Also I see that it isn't supported by xmemcached or spymemcached.
Could you describe in details what you want to achieve? What do you need such capability?

Best regards,
Ragnor



--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-spring-memecached@googlegroups.com.
Visit this group at https://groups.google.com/group/simple-spring-memecached.
For more options, visit https://groups.google.com/d/optout.

Sweta Nahata

unread,
Jun 13, 2018, 11:39:24 AM6/13/18
to simple-spring-memecached
Hi Ragnor,

So basically once the element is expired from the cache we would like to perform some operation which if not done will lead to memory issues. Is there any way we can achieve this? EhCache has the method CacheEventListener.notifyElementExpired and i'm looking for something like this.

Thanks,
Sweta


On Wednesday, June 13, 2018 at 2:08:03 PM UTC+5:30, ragnor84 wrote:
Hi,

There isn't such functionality in SSM. Also I see that it isn't supported by xmemcached or spymemcached.
Could you describe in details what you want to achieve? What do you need such capability?

Best regards,
Ragnor


On 13 June 2018 at 06:45, Sweta Nahata <naha...@gmail.com> wrote:
Hi,

EhCache has the capability of registering a cache listener for events such as put, get, evict, expired, update etc where as I don't see this capability with simple-spring-memcached. Can you let me know if there is a way to achieve this?

Thanks,
Sweta

--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.

Jakub Białek

unread,
Jun 13, 2018, 12:00:39 PM6/13/18
to simple-spring-memecached
Sweta,

Memcached doesn't support any kind of notification. So it's impossible to be notified that particular key has expired. It also impossible to add such feature to SSM.

What memory related issues are you afraid?

Best regards,
Ragnor


On 13 June 2018 at 17:39, Sweta Nahata <naha...@gmail.com> wrote:
Hi Ragnor,

So basically once the element is expired from the cache we would like to perform some operation which if not done will lead to memory issues. Is there any way we can achieve this? EhCache has the method CacheEventListener.notifyElementExpired and i'm looking for something like this.

Thanks,
Sweta

On Wednesday, June 13, 2018 at 2:08:03 PM UTC+5:30, ragnor84 wrote:
Hi,

There isn't such functionality in SSM. Also I see that it isn't supported by xmemcached or spymemcached.
Could you describe in details what you want to achieve? What do you need such capability?

Best regards,
Ragnor


On 13 June 2018 at 06:45, Sweta Nahata <naha...@gmail.com> wrote:
Hi,

EhCache has the capability of registering a cache listener for events such as put, get, evict, expired, update etc where as I don't see this capability with simple-spring-memcached. Can you let me know if there is a way to achieve this?

Thanks,
Sweta

--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsubscr...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.
Visit this group at https://groups.google.com/group/simple-spring-memecached.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-spring-memecached@googlegroups.com.

Sweta Nahata

unread,
Jun 14, 2018, 1:18:32 AM6/14/18
to simple-spring-memecached

Hi Ragnor,

One of the use cases where we were using was to remove expired compiled Groovy scripts from cache by using the method InvokerHelper.removeClass(compiledScript.getClass()); from groovy library. We are storing compiledScript in cache and after the element is deleted from memcache we would also want to clear the metaspace in memory by using the above method.
But I understand your point and will think of some other alternative.

Thanks,
Sweta
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.
Visit this group at https://groups.google.com/group/simple-spring-memecached.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages