
    g                     B    d Z ddlmZ ddlmZ ddlmZ  G d de      Zy)z|
Daily cleanup job.

Can be run as a cronjob to clean out old data from the database (only expired
sessions at the moment).
    )settings)caches)DailyJobc                       e Zd ZdZd Zy)JobzCache (db) cleanup Jobc                     t        t        d      rUt        j                  j                         D ]3  \  }}|d   j	                  d      st
        |   }|j                          5 y y )NCACHESBACKENDDatabaseCache)hasattrr   r	   itemsendswithr   clear)self
cache_namecache_optionscaches       g/var/www/django_project/virt/lib/python3.12/site-packages/django_extensions/jobs/daily/cache_cleanup.pyexecutezJob.execute   s]    8X&-5__-B-B-D ")
M +44_E":.EKKM"  '    N)__name__
__module____qualname__helpr    r   r   r   r      s    #Dr   r   N)__doc__django.confr   django.core.cacher   !django_extensions.management.jobsr   r   r   r   r   <module>r       s!    ! $ 6	( 	r   