Join GitHub today
Expand Padrino::Cache to support all features of underlying cache #836
This adds a catch all for the Redis caching class, so if you use a function in Redis (such as sets) that is not supported by Padrino, it is passed on to the base class.
I could modify this to be a little more generic, I'm just looking for a little direction.
I was thinking of adding essentially a catch all for the cache class, that could be turned on or off in the settings.
referenced this pull request
Apr 25, 2012
I think this is a decent idea. Can you add a test just making sure this functionality works? Also can you change it to only pass through if the backend supports the method call (and add parenthesis to the method definition):
def method_missing(name, *args, &block) if @backend.respond_to?(name) @backend.send(*args) else super end end