]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Add reload options to CLI/AMI stale object commands. 18/4818/2
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:42:29 +0000 (17:42 -0600)
commit9e3150b98ddf4ecfe09e281c73c634b89ba2514e
tree8d6352d6651ff0f72c51e1dedece1e08a838ad6f
parent48178e5918967337624a7e43ff1d84a7bb63fa85
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