¡@

Home 

python Programming Glossary: cache.set

Django cache.set() causing duplicate key error

http://stackoverflow.com/questions/1189541/django-cache-set-causing-duplicate-key-error

cache.set causing duplicate key error My Django site recently started.. out why... I call from django.core.cache import cache cache.set 'blogentry' some_value And the error thrown by Django is TransactionManagementError..

PicklingError: Can't pickle <class 'decimal.Decimal'>: it's not the same object as decimal.Decimal

http://stackoverflow.com/questions/1412787/picklingerror-cant-pickle-class-decimal-decimal-its-not-the-same-object

film20 utils cache_helper.py line 80 in set_cache return cache.set CACHE_MIDDLEWARE_KEY_PREFIX full_path result get_time cache_string.. core cache backends memcached.py line 37 in set self._cache.set smart_str key value timeout or self.default_timeout File usr..

Cache a django view that has URL parameters

http://stackoverflow.com/questions/1590372/cache-a-django-view-that-has-url-parameters

s user_id if user is None user User.objects.get pk user_id cache.set user_id_ s user_id user 10 60 # 10 minutes ... .. . share..

Celery - Get task id for current task

http://stackoverflow.com/questions/3302320/celery-get-task-id-for-current-task

on a file # ... Code to perform the operation ... cache.set current_task_id operation_results The idea is that when I create.. list them specifically @task def do_job path task_id None cache.set task_id operation_results The list of default keyword arguments..

Celery periodic_task running multiple times in parallel

http://stackoverflow.com/questions/7719203/celery-periodic-task-running-multiple-times-in-parallel

. E.g. In 1 from django.core.cache import cache In 2 cache.set 'counter' 0 In 3 cache.incr 'counter' Out 3 1 In 4 cache.incr..