ensure cache for fn exists