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
I am wrapping the BaseCacheManager<> object to customize key values. Several methods allow overrides (Get, Put, Add, etc). However, there are some really nice helper methods that cannot be overridden.
Example of the wrapper in an external project:
Example do flagging addtl helper methods in BaseCacheManager as virtual:
Since I am new to the project, I may be overlooking something. But my goal is to modify the key before any cache requests. At first thought, hooking into the various events for cache operations (OnAdd, OnRemove, etc) I could do this, but they key is readonly here, and that's probably a safety measure. Do you see any issue with marking the additional caching methods in the BaseCacheManager class as virtual?
I could submit a PR if not. I only have a few hours of familiarity with this project, so I don't know the implications this may have on the design strategy of the CacheManager project.
The text was updated successfully, but these errors were encountered:
Hi @jthope,
I think you actually only have to override the 4 protected methods for Get/Put/Add/Delete Internal. Those methods are invoked from basically everything else.
Except, updates. Those work slightly different and for some reason are not virtual/protected. I guess if you need those, too, I wouldn't disagree to change the access level for those.
I am wrapping the BaseCacheManager<> object to customize key values. Several methods allow overrides (Get, Put, Add, etc). However, there are some really nice helper methods that cannot be overridden.
Example of the wrapper in an external project:
Example do flagging addtl helper methods in BaseCacheManager as virtual:
Since I am new to the project, I may be overlooking something. But my goal is to modify the key before any cache requests. At first thought, hooking into the various events for cache operations (OnAdd, OnRemove, etc) I could do this, but they key is readonly here, and that's probably a safety measure. Do you see any issue with marking the additional caching methods in the BaseCacheManager class as virtual?
I could submit a PR if not. I only have a few hours of familiarity with this project, so I don't know the implications this may have on the design strategy of the CacheManager project.
The text was updated successfully, but these errors were encountered: