Add TTLCache, refactor base class