educreations/django-ormcache

Deprecate from_ids in favor of optimizing filter(pk__in=[...])

frewsxcv opened this issue · 6 comments

qs.from_ids([...]) is essentailly the same functionality as qs.filter(pk__in=[...]). No reason to invent a new method

Haven't though this entirely through yet, just throwing it out there for now

So are you thinking that you'd override filter and then look for pk__in or id__in and deal with that case there?

Yeah. What do you think about that?

(this is mostly a note to myself) I would also probably look for pk__range and id__range too

I think that is a safe path to take. The reason is that the library already overrides get, so the expectation is set. Plus, you have to activate the cache for a model with a flag on the model.

Duplicate of #16