res_sorcery_memory_cache: Add basic module implementation.
authorJoshua Colp <jcolp@digium.com>
Sat, 16 May 2015 22:02:50 +0000 (19:02 -0300)
committerJoshua Colp <jcolp@digium.com>
Fri, 22 May 2015 14:28:24 +0000 (09:28 -0500)
commitf2cc766d817191c79b97668a67a203fe7cf1c588
tree5474d9964c7ec1b0ef30af0ab69a6e2514d98267
parent44d82b9479635ed2183e556309fb20a0f305765c
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]