[FIX] registry: avoid discarding registry or cache when the registry is fresh
authorOlivier Dony <odo@openerp.com>
Fri, 11 Oct 2013 10:03:13 +0000 (12:03 +0200)
committerOlivier Dony <odo@openerp.com>
Fri, 11 Oct 2013 10:03:13 +0000 (12:03 +0200)
commit78579d289b9db3e19e2c3f8728fc42c53ec52620
tree9cdf554f5d8de7bde80e42a0d2143ba84cc28a3e
parentdafa12d92caf553f40bd1bbb052864ab63d4bd53
[FIX] registry: avoid discarding registry or cache when the registry is fresh

When the sequence value is 1 it means that either:
 - the registry was just instantiated, so there is no
   reason to reload it immediately, the real checks will
   start at next request
 - the db was just created with new sequences set to 1,
   so there has been no change to reload

In both cases there is no good reason to reload the
registry, and it is actually a performance killer,
especially for cron workers that keep iterating on
the list of databases.

bzr revid: odo@openerp.com-20131011100313-4bud8e9xq2afp9z7
openerp/modules/registry.py