Usage
from django_cached_counts import CachedCount
class MyModel(models.Model):
bar = models.ManyToManyField(Bar)
foo_count = CachedCount("foo_set", filter=Q(foo__x__gte=10))
total_user_count = CachedCount(User.objects.all())
m2m_count = CachedCount('bar_set')
class Foo(models.Model):
mymodel = models.ForeignKey(MyModel)
Those counts would be cached and invalidated when models Foo or User are saved/deleted
Release files for django-cached-counts 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_cached_counts-0.2.1.tar.gz | 1.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_cached_counts-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.8 kB
Release files / django_cached_counts-0.2.1.tar.gz
| Download URL | django_cached_counts-0.2.1.tar.gz |
|---|---|
| Size | 1.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
377bdcc796147019dabf3afa7401f29b66e9068a92c6acdf83ff8d6149057017
|
|
BLAKE2b-256 checksum How to use checksums |
2c82da01d59238c594e7142660bd2737db3a24a6a39b7bcc20bb7ff42c0b09e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.1
|
Release files / django_cached_counts-0.2.1-py3-none-any.whl
| Download URL | django_cached_counts-0.2.1-py3-none-any.whl |
|---|---|
| Size | 2.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb586df406d54c3e877f6a30787ea3875270955ff959bee9620932424e1349ec
|
|
BLAKE2b-256 checksum How to use checksums |
41b4fe8c73a61d116aba3d4256a1254c0865f6e4d90ed928011300f799bb13a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.1
|