summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/data_manager.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/framework/data_manager.js')
-rw-r--r--addons/web/static/src/js/framework/data_manager.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/data_manager.js b/addons/web/static/src/js/framework/data_manager.js
index 29d6d585f6a..f2aa602ab41 100644
--- a/addons/web/static/src/js/framework/data_manager.js
+++ b/addons/web/static/src/js/framework/data_manager.js
@@ -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: {},
@@ -19,6 +23,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.
*
* @param {int|string} [action_id] the action id or xmlid