I'm recording some records in Python memcach. I Object Structure is shown below How do I record a database inquiry like I can get it.
Category cart details (models.Model): id = models.AutoField (primary_key = true) item_name = models.CharField (max_length = 100) location = model.carfield (max_long = 250) item_type = Model. Araginki (Item Type) Comments = Model. TextField (max_length = 250, empty = true) item_code = model.ccarfield (max_length = 100) main_kat_id = model. )
I know I can use memcache like this
cache.get (& lt; some key & gt;)
I want something, as if we are queuing in the degego
& lt; Some models & gt; .objects.filter (& lt; condition & gt;)
i mean in any way so that I can specify some condition and get the record from the meme Cache.get () #condition such as item_name = "some object", item_type = 1 etc.
What are the best practices
You are missing points that this is a simple key-value store, you can not question it: This is the database. The ORM equivalent to the Django LINQ, which you are already using. But in .net like in Dijongo, you can not run arbitrary questions on a cache layer.
No comments:
Post a Comment