]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Add reload options to CLI/AMI stale object commands. 20/4820/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:48 +0000 (17:43 -0600)
commite9ae110c1cbb53528a9b4341f6df47cf58a11a79
tree9b3bd2b2dc2c0c2e2fd16b6bdf5d43e8a54e85f4
parent4a6f5fa595b8dbe768e53da8e0659a0f0f7a12ac
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