Migrated to v4.2, adjusted code

moved cachekey management to separate class for memorycache, so
cachekeys are no longer kept in memory indefinitely. Added tag support
and other v4.2 interface enhancements.