Change key of cache to generic type