Bugs: Browse | Submit New | Admin

[#7599] [PATCH] cached-model still broken if a cache miss occurs

Date:
2007-01-05 17:16
Priority:
3
Submitted By:
Jon Evans (evansj)
Assigned To:
Eric Hodel (drbrain)
Category:
None
State:
Open
Summary:
[PATCH] cached-model still broken if a cache miss occurs

Detailed description
The code in memcache_util.rb still fails if there is a cache miss, even if a block is provided.

It yields to the block on cache miss, and saves the block return in the cache, but then returns nil to the caller.

In the attached patch I have chosen to fix it by renaming the 'result' variable to 'value' but you could of course do
it the other way round if you prefer 'result'.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-02-28 22:57
Sender: Lee Iverson

This doesn't quite get there yet.  If there is a MemCache error,
then the Cache.get should return nil as well...

The patch attached will do that!
Date: 2007-01-05 17:27
Sender: Jon Evans

I meant memcache_client, not cached-model. :) memcache-client
isn't in the
dropdown BTW.

Attached Files:

Name Description Download
memcache_fix.patch fix Cache.get Download

Changes:

Field Old Value Date By
assigned_tonone2007-01-05 17:27evansj
File Added1088: memcache_fix.patch2007-01-05 17:16evansj