mirror of
https://github.com/goauthentik/authentik
synced 2026-05-05 06:32:15 +02:00
packages/django-postgres-cache: use upsert instead of select/update in a transaction (#17760)
This commit is contained in:
committed by
GitHub
parent
9b6aa56df2
commit
27ceb3ccf3
@@ -1,12 +1,14 @@
|
||||
from django.db import models
|
||||
from psqlextra.manager import PostgresManager
|
||||
|
||||
|
||||
class CacheEntry(models.Model):
|
||||
|
||||
cache_key = models.TextField(primary_key=True)
|
||||
value = models.TextField()
|
||||
expires = models.DateTimeField(db_index=True)
|
||||
|
||||
objects = PostgresManager() # type: ignore[no-untyped-call]
|
||||
|
||||
class Meta:
|
||||
default_permissions = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user