]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Add reload options to CLI/AMI stale object commands. 19/4819/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:43:35 +0000 (17:43 -0600)
commit1997157e7eca1616df4a43faed17aca498f0cadd
tree47c19308f1c945263d31d8d1cead9916a222598b
parent28733bb0ab1aba99c282a19fb6d63241bf104133
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