So I have a function that sets cache (and successfully outputs it):

def push_cache:
    cache.set('foo_cache', 'FUBAR!!!')
    foodata = cache.get('foo_cache')
    print(foodata) # this works

However when I try to access that cache from within a view and
directly output it it returns None:

def fetch_cache(request):
    cache_data = cache.get('foo_cache')
    return HttpResponse(cache_data) #this does not work.


Am i misunderstanding something fundamental in how cache works?

I am using the memcached backend in django 1.2.3

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to