Ticket 408 - Fix crash when disabling/enabling the setting
Bug Description: Enabling/disabling can lead to crash as the setting
was not designed to be dynamically updated.
Fix Description: Do not use the actual config setting to determine if the
cache is enabled. Instead we record when the cache is
initialized. The server still needs to be restarted for
the config change to take effect.
Also freed the cache at server shtudown.
https://fedorahosted.org/389/ticket/408
Reviewed by: rmeggins(Thanks!)
(cherry picked from commit 03c90f04065059ee310e9fa7d98228e0aa39fa50)