MCPcopy Index your code
hub / github.com/feast-dev/feast / refresh_registry

Method refresh_registry

sdk/python/feast/feature_store.py:443–459  ·  view source on GitHub ↗

Fetches and caches a copy of the feature registry in memory. Explicitly calling this method allows for direct control of the state of the registry cache. Every time this method is called the complete registry state will be retrieved from the remote registry store backend (e.

(self)

Source from the content-addressed store, hash-verified

441 self._fs_name_index_ts = -self._FS_NAME_INDEX_TTL_SECONDS
442
443 def refresh_registry(self):
444 """Fetches and caches a copy of the feature registry in memory.
445
446 Explicitly calling this method allows for direct control of the state of the registry cache. Every time this
447 method is called the complete registry state will be retrieved from the remote registry store backend
448 (e.g., GCS, S3), and the cache timer will be reset. If refresh_registry() is run before get_online_features()
449 is called, then get_online_features() will use the cached registry instead of retrieving (and caching) the
450 registry itself.
451
452 Additionally, the TTL for the registry cache can be set to infinity (by setting it to 0), which means that
453 refresh_registry() will become the only way to update the cached registry. If the TTL is set to a value
454 greater than 0, then once the cache becomes stale (more time than the TTL has passed), a new cache will be
455 downloaded synchronously, which may increase latencies if the triggering method is get_online_features().
456 """
457
458 self.registry.refresh(self.project)
459 self._clear_feature_service_cache()
460
461 def list_entities(
462 self, allow_cache: bool = False, tags: Optional[dict[str, str]] = None

Callers 6

applyMethod · 0.95
test_get_online_featuresFunction · 0.95
async_refreshFunction · 0.45
_async_refreshMethod · 0.45
async_refreshFunction · 0.45

Calls 2

refreshMethod · 0.45