New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Padrino::Cache to support all features of underlying cache #836

Merged
merged 6 commits into from Apr 30, 2012

Conversation

Projects
None yet
3 participants
@icco
Contributor

icco commented Apr 25, 2012

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.

Yay? Nay?

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Apr 25, 2012

Member

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
Member

nesquena commented 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
@icco

This comment has been minimized.

Show comment
Hide comment
@icco

icco Apr 28, 2012

Contributor

Cool. Test added and tweaked the function as suggested. Also synced with master.

Contributor

icco commented Apr 28, 2012

Cool. Test added and tweaked the function as suggested. Also synced with master.

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Apr 30, 2012

Member

Does this look good to you guys, affords a bit more flexibility @DAddYE

Member

nesquena commented Apr 30, 2012

Does this look good to you guys, affords a bit more flexibility @DAddYE

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Apr 30, 2012

Member

I like it!!!

Member

DAddYE commented Apr 30, 2012

I like it!!!

DAddYE added a commit that referenced this pull request Apr 30, 2012

Merge pull request #836 from icco/redis-extension
Expand Padrino::Cache to support all features of underlying cache

@DAddYE DAddYE merged commit 7832933 into padrino:master Apr 30, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment