xero.module's xero_get_cache() calls cache_get(…, 'cache'), meaning that it caches data in rows in the {cache} table. With memcache.module, it's common practice to assign the {cache} table to be handled by Memcache.
Drupal core's implementation of cache_get() returns 0 for nonexistent entries.
But Memcache's implementation of cache_get() returns false for nonexistent entries. Since this isn't a number, xero.module's xero_get_cache() assumes it's cached data, and returns it, never calling Xero to populate the cache.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | xero-memcache-2467201-2.patch | 478 bytes | mradcliffe |
Comments
Comment #1
smokrisThe attached patch solves the problem for me.
Comment #2
mradcliffeWe're not seeing the same issue on our drupal 7 sites, right? I think that's because 7.x-1.x had a fix for this. Could we try this (backport) patch instead?
Comment #3
smokrisYes, our Drupal 7 site correctly populates the Xero caches, even when stored in Memcache.
That backport looks good to me; it handles both
0andfalse.Comment #5
mradcliffeTagged a release candidate for 6.x-1.2 which has a lot of fixes in it.