Skip to content
Snippets Groups Projects
Commit 5b94799c authored by Martin Geubelle's avatar Martin Geubelle Committed by Géry Debongnie
Browse files

[IMP] web: allow to clear the cache in data manager

Sometimes, we need better control on the cache.  For example, if a view or an
action has been changed, it is required to make sure that the correct
data is loaded.
parent b1b80d8d
Branches
Tags
No related merge requests found
......@@ -9,6 +9,10 @@ var utils = require('web.utils');
return core.Class.extend({
init: function () {
this.Filters = new Model('ir.filters');
this._init_cache();
},
_init_cache: function () {
this._cache = {
actions: {},
fields_views: {},
......@@ -18,6 +22,14 @@ return core.Class.extend({
};
},
/**
* Invalidates the whole cache
* Suggestion: could be refined to invalidate some part of the cache
*/
invalidate: function () {
this._init_cache();
},
/**
* Loads an action from its id or xmlid.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment