Add cache key generation + small fixes
New cache parameters