server_cache 0.2.0 copy "server_cache: ^0.2.0" to clipboard
server_cache: ^0.2.0 copied to clipboard

Framework-agnostic cache runtime for server ecosystems (portable, from server_data/cache).

server_cache #

Framework-agnostic cache runtime for array, file, Redis, and null-backed stores.

Stores are concrete objects. Reusable construction uses typed options rather than string-keyed configuration maps:

final manager = DataCacheManager()
  ..registerStore('memory', ArrayStore())
  ..registerStoreFactory(
    'redis',
    RedisStoreFactory(),
    const RedisStoreConfiguration(host: '127.0.0.1', port: 6379),
  );

final repository = manager.store('memory');

FileStoreConfiguration, RedisStoreConfiguration, ArrayStoreConfiguration, and NullStoreConfiguration are the built-in typed options. Custom adapters implement StoreFactory<T> for their own configuration type.

Depends on server_contracts interim (to be colocated later). Provides CacheStore, ArrayStore, FileStore, RedisStore, NullStore, Repository, TaggedCache etc.

Future: dissolve server_contracts into this package (colocated CacheStore contract).

Using with Routed #

server_cache is framework-agnostic and does not initialize a Routed provider. For EngineContext helpers, depend on routed_cache and add RoutedCacheProvider to a slim engine, or import package:routed/routed.dart and use its registered cache provider.

0
likes
0
points
634
downloads

Publisher

unverified uploader

Weekly Downloads

Framework-agnostic cache runtime for server ecosystems (portable, from server_data/cache).

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

www.buymeacoffee.com

License

unknown (license)

Dependencies

crypto, file, redis, server_contracts, storage_fs

More

Packages that depend on server_cache