GitHub

persistence

API reference for persistence.

Persistence (Effect's effect/persistence): key-value stores, requests whose outcomes are stored, and caches over them.

  • key_value_store: KeyValueStore, a string-keyed store of text and bytes in memory, files, SQL or any text mapping, and schema-typed stores.
  • persistable: Persistable requests, which carry the schemas of their success and error and a primary_key().
  • persistence: Persistence, request outcomes stored by those schemas in memory, a KeyValueStore or SQL.
  • persisted_cache: PersistedCache, a Cache in front of a store.
  • persisted_queue: PersistedQueue, durable at-least-once queues in memory, SQL or Redis.
  • user_directories: UserDirectories, where a program keeps its files per user.
  • rate_limiter: RateLimiter, limits per key by fixed window or token bucket, and adaptive limits learned from 429 responses.
  • circuit_breaker: CircuitBreaker, stops calling a key that keeps failing.
  • redis: the Redis service the Redis stores run on, made over a client by redis.make; redis_py (extra pyfect-dev[redis], imported on its own) provides it on redis-py.

RequestResolver.persisted stores a resolver's outcomes.

Re-exports

Classes

Modules