change caches to function type