From 3d2fca1e8573d60e67bb2fe642fb78c517d5ccc2 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 27 Jul 2015 14:15:42 +0200 Subject: doc: Fix docs about caching The data returned by Connector.get_additional_data is also cached, so the plugin needs to invalidate the caches, even if it does not implement Connector.get_additional_groups. --- doc/development/plugins.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/development/plugins.txt b/doc/development/plugins.txt index d292c9dd7..0d524973e 100644 --- a/doc/development/plugins.txt +++ b/doc/development/plugins.txt @@ -118,7 +118,9 @@ Invalidating Caches In Bcfg2 1.3.0, some limited :ref:`server-caching` was introduced. If you are writing a :class:`Bcfg2.Server.Plugin.interfaces.Connector` plugin that implements -:func:`Bcfg2.Server.Plugin.interfaces.Connector.get_additional_groups`, +:func:`Bcfg2.Server.Plugin.interfaces.Connector.get_additional_groups` +or +:func:`Bcfg2.Server.Plugin.interfaces.Connector.get_additional_data`, then you need to be able to invalidate the server metadata cache in order to be compatible with the ``cautious`` or ``aggressive`` caching modes. @@ -140,9 +142,9 @@ called with one string argument, it expires cached data for the named client. It's important, therefore, that your Connector plugin can either track -when changes are made to the group membership it reports, and expire -cached data appropriately when in ``cautious`` or ``aggressive`` mode; -or prudently flag an incompatibility with those two modes. +when changes are made to the data or group membership it reports, and +expire cached data appropriately when in ``cautious`` or ``aggressive`` +mode; or prudently flag an incompatibility with those two modes. For examples, see: -- cgit v1.2.3-1-g7c22