Skip to content

Eviction manager

Eviction manager for handling the eviction of entries in a vector datastore.

Authors

Kadek Denaya (kadek.d.r.diana@gdplabs.id)

References

NONE

BaseEvictionManager(vector_store, eviction_strategy, check_interval=60)

Bases: ABC

Base class for eviction managers that handle the eviction process.

Initialize the eviction manager.

Parameters:

Name Type Description Default
vector_store BaseVectorDataStore | BaseDataStore

The datastore that will be managed by the eviction manager.

required
eviction_strategy BaseEvictionStrategy

The eviction strategy to use.

required
check_interval int

How often to check for entries to evict (seconds). Defaults to 60.

60

start() abstractmethod

Start the eviction checking process.

This method should be implemented by subclasses.

Raises:

Type Description
NotImplementedError

If the method is not implemented by the subclass

stop() abstractmethod

Stop the eviction checking process.

This method should be implemented by subclasses.

Raises:

Type Description
NotImplementedError

If the method is not implemented by the subclass