]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_sorcery_memory_cache: Add basic module implementation. 17/817/2
authorJoshua Colp <jcolp@digium.com>
Sat, 16 May 2015 22:02:50 +0000 (19:02 -0300)
committerMark Michelson <mmichelson@digium.com>
Wed, 8 Jul 2015 19:34:37 +0000 (14:34 -0500)
commite4d42119b5d772ab905fe5998c805772c37c0bde
tree1739a4070cac28353817a474b6c593e347b73e42
parent49a37f22e1138c1d7f5f635ecad428ce8ceab345
res_sorcery_memory_cache: Add basic module implementation.

This change adds a basic res_sorcery_memory_cache module which implements
configuration option parsing, configuration file parsing for threading,
sorcery interface implementation, and unit tests.

Objects can be added, updated, deleted, and retrieved from the memory
cache. Automatic expiration and stale handling will be added in the
future.

Note that unit tests exist within the module itself in case the
threading done as a result of expiration results in asynchronous
actions (which it likely will). Providing access and a notification
mechanism for an external test module would be complicated and
not worth it.

ASTERISK-25067 #close
Reported by: Matt Jordan

Change-Id: Id8a6a357ef5a83d466f81eee56a67d13eeb118b9
include/asterisk/sorcery.h
main/sorcery.c
res/res_sorcery_memory_cache.c [new file with mode: 0644]