diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2009-01-21 14:16:10 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2009-01-21 14:16:10 -0500 |
commit | 11193120d70635124d74811f8549bfaa05241115 (patch) | |
tree | a294a5a4bfcaa504900f35a7d509fe61ff5101a7 /cobbler/collection.py | |
parent | 16e0af1a1d048cd77ed5a3d2843d84ed19b32e8b (diff) | |
download | cobbler-11193120d70635124d74811f8549bfaa05241115.tar.gz cobbler-11193120d70635124d74811f8549bfaa05241115.tar.xz cobbler-11193120d70635124d74811f8549bfaa05241115.zip |
The beginings of a caching implementation for cobblerd to make the webapp/XMLRPC much faster.
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r-- | cobbler/collection.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py index ebe51842..e714b3fb 100644 --- a/cobbler/collection.py +++ b/cobbler/collection.py @@ -285,12 +285,17 @@ class Collection(serializable.Serializable): # save the tree, so if neccessary, scripts can examine it. if with_triggers: self._run_triggers(ref,"/var/lib/cobbler/triggers/add/%s/post/*" % self.collection_type()) - + + # update children cache in parent object parent = ref.get_parent() if parent != None: parent.children[ref.name] = ref + # signal remote cobblerd to update it's cache of this item. + if save: + self.api._internal_cache_update(ref.COLLECTION_TYPE,ref.name) + return True def _run_triggers(self,ref,globber): |