This directory contains examples of using the HyperCache package. Do not use these examples in production. All the code in this directory is for demonstration purposes only.
-
Get- An example of using the HyperCache package to fetch one or more items and retrieve a single or multiple items from cache. -
List- A simple example of using the HyperCache package to store a list of items and retrieve the list filtering and sorting the results. -
Eviction- An example of using the HyperCache package to store a list of items and evict items from the cache based on several different algorithms. -
Stats- An example of using the HyperCache package to store a list of items and retrieve the cache stats. -
Clear- An example of using the HyperCache package to store a list of items and clear the cache. -
Service- An example of implementingHyperCacheServiceand register middleware. -
Redis- An example of implementing theHyperCacheinterface using Redis as the backend. It requires that you run the Redis server locally as the default configuration points tolocalhost:6379. To run the Redis server locally, use the following command:docker compose up -d -
Middleware- An example of implementing a custom middleware and register it with theHyperCacheService. -
Size- An example of using the HyperCache package to store a list of items and limit the cache based on size. -
Observability (OpenTelemetry)- Demonstrates wrapping the service with tracing and metrics middleware using OpenTelemetry.