> Thanks for your help so far - that definitely improved things
> somewhat!

Great.

>
> However, I'm still having a slight problem. When I pass
> Item.objects.get(id=id) into the serializers.serialize( ... )
> function, it tells me that the Item is not iterable (this is why I was
> originally using filter() in the first place, in order to make it
> iterable). So a second ago I just tried encasing the
> Item.objects.get(id=id) into a list [] and this worked. However, that
> seems like a bit of a hack, or even that I'm not using the function
> correctly. Is there a better approach to take here?

You don't need the serializer at all since you're caching just a
single item instance... Just do:

cache.set(cache_key, item_obj, 30)

Sorry, I should've mentioned this in my previous post.

-RD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to