Added in-memory cache to Cache.pm and started to switch from CacheInternal.pm to Cache.pm.