Closed joe1chen closed 13 years ago
TTLs need to be Fixnums now. Just call .to_i on your 10.minutes, or alternatively, use the time_constants gem.
Thanks Evan for the fast response. I was able to change my view code to use 10.minutes.to_i and it works fine. However, there are still some issues with the view_cache code that wasn't passing in a :ttl value. In this case, the default :ttl value is used. The problem is that the default coming back from interlock is 1.day.
From Interlock's config.rb
DEFAULTS = { :ttl => 1.day, :namespace => 'app', :servers => ['127.0.0.1:11211'], :client => 'memcache-client', :with_finders => false }
I guess this means that you are forced to either add :ttl values to all view_cache calls or add a :ttl override in the memcached.yml file.
Perhaps this can be considered a bug in Interlock. Interlock should be fixed so that internally it calls .to_i on the ttl values. This way, it is compatible with memcached gem as well as retaining compatibility with memcache-client as well.
Sure; can you send me a pull request for Interlock?
Hi, I'm running into an issue where the interlock gem no longer works with the memcached gem starting with memcached 1.1.
Here's the error I'm getting:
And the view code that caused this looks like:
This issue goes away as soon as I downgrade to memcached 1.0.6.
Just by looking at the change history, it looks like this commit was the culprit:
https://github.com/fauna/memcached/commit/6ea7af86e1a6141847ff1cc9100a93644223d517
Any tips on how to fix this would be greatly appreciated.