]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Add reload options to CLI/AMI stale object commands. 21/4821/1
authorMark Michelson <mmichelson@digium.com>
Wed, 25 Jan 2017 21:26:53 +0000 (15:26 -0600)
committerMark Michelson <mmichelson@digium.com>
Wed, 25 Jan 2017 23:44:01 +0000 (17:44 -0600)
commitd32bd6386028243d5aca886ea1e8dc31765b7b9b
treeb26205e1ea70c090a7ce79c69af752e7763a5e8f
parent9a0b73e339336085e7907836de6eb173207052e2
Add reload options to CLI/AMI stale object commands.

Marking an object as stale in a memory cache is supposed to prime the
cache so that the next time the item is retrieved, the stale item is
deleted from the cache and a background task is run to re-populate the
cache with a fresh version of the object.

The problem is, there are some object types out there for which there is
no natural reason that they would be retrieved from the backend with any
regularity. Outbound PJSIP registrations are a good example of this. At
startup, they are read, and an object-specific state is created that
refers to the initially-retrieved object for all time.

Adding the "reload" option to the CLI/AMI commands gives the cache the
opportunity to manually re-retrieve the object from the backend, both
storing the new object in the cache and applying the new object's
configuration to the module that uses that object.

Change-Id: Ieb1fe7270ceed491f057ec5cbf0e097bde96c5c8
res/res_sorcery_memory_cache.c