You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add cache options, LRU with maxsize or Cache with duration. When cached headers, status code and body should be cached on C++ and never touch Python again when cached.
Should be implemented after the router decorator: #59
fromsocketifyimportAppapp=App()
router=app.router()
@router.get("/lru", lru_cache=128) #If LRU True default value is set (128)deflru(res, req):
res.end("Hello World!")
router=app.router(lru_cache=128)
@router.get("/lru_2") #If LRU is passed on router, so any route of this router is cached with lrudeflru2(res, req):
res.end("Hello World!")
@router.get("/cache", cache=30) #If cache is provided the expiration will be in seconds (30s in this cache)defcache2(res, req):
res.end("Hello World!")
router=app.router(cache=30, cache_ignores_query=True) # cache_ignores_query default is False@router.get("/cache2") #If Cache is passed on router, so any route of this router is cached with cachedefcache2(res, req):
res.end("Hello World!")
# cache, lru_cache and cache_ignores_query should be available in the app router and MiddlewareRouter tooapp.get("/test", lambdares, req: res.end("xablau"), cache=30)
Cache should synchronize all requests (only 1 request should be processed at a time, all other requests are queued and responded to with the cached content)
Cache should use URL or fullurl and be route independent (get/post/any etc)
Create LRU Cache system using C++
Create Timed Cache System using C++ and libuv
Support cache_ignores_query in LRU and Timed Cache
Support cache helper in the default Router
Support cache helper in MiddlewareRouter
Support cache helper in decorator routers
Create Documentation
The text was updated successfully, but these errors were encountered:
Add cache options, LRU with maxsize or Cache with duration. When cached headers, status code and body should be cached on C++ and never touch Python again when cached.
Should be implemented after the router decorator: #59
Cache should synchronize all requests (only 1 request should be processed at a time, all other requests are queued and responded to with the cached content)
Cache should use URL or fullurl and be route independent (get/post/any etc)
The text was updated successfully, but these errors were encountered: