[Asterisk-code-review] media cache: Add a core API and facade for a backend agnosti... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Mon May 25 07:59:48 CDT 2015


Joshua Colp has posted comments on this change.

Change subject: media cache: Add a core API and facade for a backend agnostic media cache
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

After looking at the caching I don't think there's really any overlap between res_sorcery_memory_cache, even trying to do so would likely yield in a complicated mess. They both serve different purposes and have different constraints.

https://gerrit.asterisk.org/#/c/487/1/main/media_cache.c
File main/media_cache.c:

Line 216: 		ast_bucket_file_update(bucket_file);
Can you add some documentation about what this is doing?

You retrieve a bucket file from your media cache, and then immediately tell backend storage to update the file that is in backend storage?


Line 310: 	bucket_file = ao2_find(media_cache, uri, OBJ_SEARCH_KEY | OBJ_NOLOCK);
Bucket files are allocated as immutable objects without locks. For both create/update you'll want to create a new one and replace the old one.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I11227abbf14d8929eeb140ddd101dd5c3820391e
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list