#31794: NotImplementedError: subclasses of BaseCache must provide a touch() 
method
-----------------------------------------------+------------------------
               Reporter:  Robin                |          Owner:  nobody
                   Type:  Uncategorized        |         Status:  new
              Component:  Core (Cache system)  |        Version:  3.1
               Severity:  Normal               |       Keywords:  cache
           Triage Stage:  Unreviewed           |      Has patch:  0
    Needs documentation:  0                    |    Needs tests:  0
Patch needs improvement:  0                    |  Easy pickings:  0
                  UI/UX:  0                    |
-----------------------------------------------+------------------------
 I am getting the following exception when trying to call cache.touch()
 method.


 {{{
 File "PROJECT_PATH/.venv/lib/python3.8/site-
 packages/django/core/cache/backends/base.py", line 135, in touch
     raise NotImplementedError('subclasses of BaseCache must provide a
 touch() method')
 NotImplementedError: subclasses of BaseCache must provide a touch() method
 }}}



 {{{
 # settings.py

 CACHES = {
     "default": {
         "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
         "LOCATION": "unique-snowflake",
     }
 }

 #tasks.py
 from django.core.cache import cache


 def test():
     ...
     cache.touch("session_cache_ffff0000", 1500)
    ...
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31794>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.b752ab7a4ab52700b8514e20d70ef47f%40djangoproject.com.

Reply via email to