debian/cubicweb-ctl.postrm
author |
Aurelien Campeas <aurelien.campeas@logilab.fr> |
|
Tue, 19 Mar 2013 15:18:22 +0100 |
changeset 8735 |
5567a5117aeb |
parent 0 |
b97547f5f1fa
|
child 10559 |
5821ae654dfd |
permissions |
-rw-r--r-- |
[entity] ensure the .related(entities=False) parameter is honored all the way down (closes #2755994)
As of today, such a call will always fill the relation cache by
calling .entities() on every single related rset entry.
As a consequence, the `limit` parameter handling also had to be fixed.
It was bogus in the following ways:
* not used in the related_rql, hence potentially huge database
requests, but also actually
* foolishly used in the .entities()-calling cache routine we now
bypass (this changeset ticket's main topic)
Now:
* we set a limit on the rql expression, and
* forbid caching if given a non-None limit (as we don't want to make
the cache handling code more complicated than it is already)
With this, entity.unrelated gets a better limit implementation (so the
code in related/unrelated is nice and symmetric)
Risk:
* _cw_relation_cache disappears completely, which is good, but this is
Python, so you never know ...
0
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
1 |
#!/bin/sh -e
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
2 |
if [ "$1" = "purge" ] ; then
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
3 |
update-rc.d cubicweb remove >/dev/null
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
4 |
fi
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
5 |
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
6 |
#DEBHELPER#
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
7 |
|
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff
changeset
|
8 |
exit 0
|