Quickstart
Install
Section titled “Install”uv add oridecon-cacheMinimal Setup — CacheModule
Section titled “Minimal Setup — CacheModule”import asynciofrom oridecon import Applicationfrom oridecon.cache import CacheModule
async def main(): async with Application.boot( name="my-app", modules=[CacheModule.configure()], ) as app: from oridecon.cache import CacheService
cache = await app.container.resolve(CacheService) await cache.set("greeting", "Hello, Oridecon!") value = await cache.get("greeting") print(value) # "Hello, Oridecon!"
asyncio.run(main())Using CacheProvider Directly
Section titled “Using CacheProvider Directly”from oridecon import Applicationfrom oridecon.cache import CacheProvider
def create_app() -> Application: app = Application(name="my-app") app.add_provider(CacheProvider()) return appTesting with CacheModule.stub()
Section titled “Testing with CacheModule.stub()”from oridecon.cache import CacheModule
# In-memory backend with no external connectionstest_module = CacheModule.stub()Next Steps
Section titled “Next Steps”- Guide — caching concepts and workflows
- How-Tos — Redis, Memcached, stampede protection recipes
- Configuration — all configuration keys