mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-02-17 23:34:14 +08:00
17 lines
450 B
Python
17 lines
450 B
Python
from django.db.models.base import Model
|
|
from typing import Optional
|
|
|
|
|
|
class FieldCacheMixin:
|
|
def delete_cached_value(self, instance: Model) -> None: ...
|
|
def get_cached_value(
|
|
self,
|
|
instance: Model,
|
|
default: object = ...
|
|
) -> Optional[Model]: ...
|
|
def is_cached(self, instance: Model) -> bool: ...
|
|
def set_cached_value(
|
|
self,
|
|
instance: Model,
|
|
value: Optional[Model]
|
|
) -> None: ... |