[Asterisk-code-review] res sorcery memory cache: Add support for a full backend cache. (asterisk[13])

Joshua Colp asteriskteam at digium.com
Thu Dec 17 13:03:11 CST 2015


Joshua Colp has posted comments on this change.

Change subject: res_sorcery_memory_cache: Add support for a full backend cache.
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.asterisk.org/#/c/1808/4/res/res_sorcery_memory_cache.c
File res/res_sorcery_memory_cache.c:

Line 729: 	if (cache->full_backend_cache && (front = ast_heap_peek(cache->object_heap, 1))) {
        : 		/* For a full backend cache all objects share the same lifetime */
        : 		cached_object->created = front->created;
        : 	}
> Would it make sense to do this when allocating cached_object? You have the 
The lock on the cache is not held during allocation, I could change the code to hold the lock during that time but I opt for holding the lock as short as possible.


-- 
To view, visit https://gerrit.asterisk.org/1808
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie2993487e9c19de563413ad5561c7403b48caab5
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list