According to the xcache api ,http://xcache.lighttpd.net/wiki/XcacheApi, the xcache_set function takes in an optional parameter ttl (time to live). For Xcache, ttl is the number of seconds from now that the cache entry should live. This is different than the Drupal conventions for limiting the lifetime of a cache entry, as cache_set's optional $expire argument represents a timestamp at which the entry is no longer valid. The result of passing the $expires timestamp to xcache_set is a timestamp overflow and the cache always being invalidated.

As a result, we need to shift the $expires timestamp by the current time to get the intended time offset.

I will attach a patch momentarily.

CommentFileSizeAuthor
#1 authcache-559392.patch879 bytesbrianpkennedy

Comments

brianpkennedy’s picture

StatusFileSize
new879 bytes

Attaching fix, shift by current time().

brianpkennedy’s picture

Status: Active » Patch (to be ported)
Jonah Ellison’s picture

Status: Patch (to be ported) » Closed (won't fix)

The new Authcache release removed all the Cache Router engine code (since the two modules are now compatible with each other), so I'm marking this to "won't fix." The page cache ttl was also change to use CACHE_TEMPORARY. Hopefully the new Cache Router release fixed these XCache issues, if not, please open an issue on the Cache Router project page.

rrittenhouse’s picture

Will this make Drupal log you off at random intervals?