diff options
author | George Joseph <george.joseph@fairview5.com> | 2016-02-25 14:13:19 -0700 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2016-02-29 11:31:42 -0600 |
commit | 4422905218bf5f3033699ce35abe554f4c691a52 (patch) | |
tree | 2751752ad23d3ca141a148e81065b5da52280229 /rest-api | |
parent | 62d98b5a7f096b39bde412bac5cb310aeb7ee068 (diff) |
sorcery: Refactor create, update and delete to better deal with caches
The ast_sorcery_create, update and delete function have been refactored
to better deal with caches and errors.
The action is now called on all non-caching wizards first. If ANY succeed,
the action is called on all caching wizards and the observers are notified.
This way we don't put something in the cache (or update or delete) before
knowing the action was performed in at least 1 backend and we only call the
observers once even if there were multiple writable backends.
ast_sorcery_create was never adding to caches in the first place which
was preventing contacts from getting added to a memory_cache when they
were created. In turn this was causing memory_cache to emit errors if
the contact was deleted before being retrieved (which would have
populated the cache).
ASTERISK-25811 #close
Reported-by: Ross Beer
Change-Id: Id5596ce691685a79886e57b0865888458d6e7b46
Diffstat (limited to 'rest-api')
0 files changed, 0 insertions, 0 deletions