Closed dyorgio closed 8 years ago
@debop This has been around for a year. Just found the need for the same functionality, and it looks good to us. Any chance this could be merged in?
+1
@bostanio we could pull this into our fork, looks useful, wdyt?
@dyorgio, @davidells, @peruzzo what's the need here?
The full on key customizer seems like bit much. Would a simple key prefix be enough or is there some need for a suffix as well?
Also we need to be careful to get all instances of keys. I'm pretty sure the submitted fix doesn't capture the zsets that the plugin also uses and I bet that has some bad effects in a multi tenant situation. We also likely need tests to prove the correctness of the fix.
We'd be happy to consider a change to support this use case. We've forked the project here: https://github.com/hibernate-redis/hibernate-redis. If this is still of interest please create a PR there and we can discuss.
@bostanio This help me to isolate second lvl cache by tenant. I believe that the best implementation needs to use a different database by tenantId, but it will more hard to implement. Also hibernate-redis, in my option, is not ready for production. I did some modifications in a private repository(private company) to support expiration by key, than I could use it. I also have some doubts about using redis with second lvl cache, because I like to make cluster of my cache servers, ehcache is better to do it.
@dyorgio would you be willing to contribute your work for supporting expiration by key so you no longer need to maintain a third party library?
@debop does Reddison have anything built-in for this?
@dyorgio , @johnou Redisson does not built-in for this. I will merge this code for multi-tenant env.
Thanks @dyorgio
@dyorgio if you have test code, please send to me.
@debop @dyorgio looks like this could be achieved by using Environment.CACHE_REGION_PREFIX..?
Necessary to isolate second level and query caches in a multi-tenancy env.
ex: