Forum: Ruby on Rails Multiple log entries when using Rails.cache

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E0065184aad5afbd13f0c3c57ff9180c?d=identicon&s=25 Rudi W. (whitespace)
on 2009-04-17 10:32
I've started using Rails.cache, specially Rails.cache.fetch. This gives
me some log entries I'm a little curious about - I hope someone can poke
me in the right direction.

Examples:

1.
Rails.cache.write('testing', 'test value')
Rails.cache.read('testing')

Gives these log entries:

Cache write: testing
Cache write: testing
Cache read: testing
( Why the two writes? )

2.
Rails.cache.fetch('testing') { 'test value' }

Gives these log entries:

Cache read: testing
Cache write: testing
Cache miss: testing ({})
Cache write: testing
Cache write (will save 0.00ms): testing
( Miss after it is writtin? And then to extra writes? )

Best regards
Rudi
E0065184aad5afbd13f0c3c57ff9180c?d=identicon&s=25 Rudi W. (whitespace)
on 2009-04-20 16:13
I've narrowed it down to situations when memcache store is used.

I think somehow the @logger_off property in active_supports cache.rb is
ignored when used with memcache?

Have anybody else experienced something similar?

Regards
Rudi
This topic is locked and can not be replied to.