Added constant time cache class