Add unit testing + fix memcache expiry (zero = unlimited TTL)