APC: get a key's expiration time

It’s always surprising to me, but APC is still the best kept secret. APC offers a bunch of very useful features — foremost a realpath cache and an opcode cache. However, my favorite is neither: it’s being able to cache data in shared memory. How so? Simple: use apc_store() and apc_fetch() to persist data between requests. The other day, I wanted use a key’s expiration date to send the appropriate headers (Expires and Last-Modified) to the client, but it didn’t seem like APC supports this out of the box yet....

November 8, 2010 · 1 min

PHP, APC and sessions

Playing with redis/Rediska and sessions, I wanted to get more numbers to compare this solution to a traditional MySQL-based approach which also made me revisit the idea of a CouchDB-based session handler for Zend_Session. Implementing this handler, I ran into a weird issue: Fatal error: Undefined class constant 'ALLOW_ALL' in /usr/home/till/foo/trunk/library/Zend/Uri/Http.php on line 447 Call Stack # Time Memory Function Location 1 0.7357 3914816 Foo_Session_SaveHandler_Couchdb->write( ) ../Couchdb.php:0 2 0.7358 3916600 Foo_Couchdb->query( ) ....

May 26, 2010 · 3 min