mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
feat: add more type hints
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import hashlib
|
||||
from typing import Optional
|
||||
from typing import Optional, Callable
|
||||
|
||||
from starlette.requests import Request
|
||||
from starlette.responses import Response
|
||||
|
||||
|
||||
def default_key_builder(
|
||||
func,
|
||||
func: Callable,
|
||||
namespace: Optional[str] = "",
|
||||
request: Optional[Request] = None,
|
||||
response: Optional[Response] = None,
|
||||
args: Optional[tuple] = None,
|
||||
kwargs: Optional[dict] = None,
|
||||
):
|
||||
) -> str:
|
||||
from fastapi_cache import FastAPICache
|
||||
|
||||
prefix = f"{FastAPICache.get_prefix()}:{namespace}:"
|
||||
|
||||
Reference in New Issue
Block a user