def has_cache(self):
if not self.cache_enabled:<EOL><INDENT>return False<EOL><DEDENT>if self._cache is None:<EOL><INDENT>self.build_cache()<EOL><DEDENT>return True<EOL>
Intended to be called before any call that might access the
        cache. If the cache is not selected, then returns False,
        otherwise the cache is build if needed and returns True.