You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I found that there're dispose and disposeAfter options in constructor.
In my case, I want to distinguish these two behaviors:
items deleted because of ttl settings (with ttlAutoPurge)
items deleted manually (by calling cache.delete)
in order to destroy something like File handles to prevent memory leaks.
When an item is manually deleted by the user, I just turn the control to the user to decide when to destroy. But when the item is evicted beaucse of max size settings or ttl settings, I need to automatically destroy them in dispose or disposeAfter hooks. And I found that in both ttl deleted case and manually deleted case, the reasons are delete. So I found it hard to implement my logics.
Is there any solution to this?
The text was updated successfully, but these errors were encountered:
Hello, I found that there're
dispose
anddisposeAfter
options in constructor.In my case, I want to distinguish these two behaviors:
cache.delete
)in order to destroy something like File handles to prevent memory leaks.
When an item is manually deleted by the user, I just turn the control to the user to decide when to destroy. But when the item is evicted beaucse of max size settings or ttl settings, I need to automatically destroy them in
dispose
ordisposeAfter
hooks. And I found that in both ttl deleted case and manually deleted case, thereason
s aredelete
. So I found it hard to implement my logics.Is there any solution to this?
The text was updated successfully, but these errors were encountered: