Closed floer32 closed 9 years ago
We already have namespaces, is there a use case where namespaces won't work and this will?
It doesn't impact the code much to make the change, and namespaces are a redis feature not a library feature, right? The user shouldn't be forced to use a redis feature for this purpose, particularly when the premise of the library is to KISS. For some clients, this might be the clearest way to do it.
Please also notice https://github.com/hangtwenty/redis-simple-cache/commit/37b4f9446c6c3b82671bdcc7055bf75a41c9f133 , I want to make sure that gets in.
Redis allows namespacing through virtual database numbers. Each database number corresponds to a flat global namespace. The namespace parameter in SimpleCache is a prefix to keys in the database to prevent collisions with other keys in that database. There is already an option to tell SimpleCache which database to use, or what prefix to use, in case the user wants something different from the default values.
Your other commit looks fine.
OK, thank you for taking the time to explain!
so that this method can be overwritten!