Skip to main content
Version: Beta 🚧

CacheConfig

Summary​

Configuration object for feature view online caching.

For more info on enabling caching and its benefits, see Cache Features for Real-time Inference.

Example​

An example of CacheConfig declaration as part of FeatureView:

# CacheConfig is normally used as a named argument parameter to a Feature View instance definition.
from tecton import CacheConfig, batch_feature_view, FeatureService

cache_config = CacheConfig(max_age_seconds=3600)


@batch_feature_view(cache_config=cache_config)
def my_cached_feature_view():
return

Attributes​

The attributes are the same as the __init__ method parameters. See below.

Methods​

__init__(...)​

Parameters

  • max_age_seconds (int) - The maximum time in seconds that features from this feature view can be cached. Must be between one minute (60s) and one day (86_400s). Default: None

Was this page helpful?

🧠 Hi! Ask me anything about Tecton!

Floating button icon