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

Matt Jordan asteriskteam at digium.com
Sat Jul 4 09:46:48 CDT 2015


Matt Jordan has posted comments on this change.

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


Patch Set 2:

> I'm not really swayed one way or the other. The addition to sorcery
 > may be nice, but I'm not sure how it would work for normal sorcery
 > objects in practice.

I was thinking about this some more over breakfast. How about something reasonably "simple", like:

static int ast_sorcery_is_stale(void *obj);

That is: simply tell me if the current object is stale.

The concept of staleness applies to _most_ backends (databases and static conf files). This would also let me rework this code (assuming a similar mechanism was provided in the bucket API) to do things like:

if (ast_bucket_is_stale(obj)) {
    new_obj = ast_bucket_retrieve(uri);
}

That is, a retrieve would not be "dual-purposed" into checking both staleness and retrieval. That should also remove needing to use 'update' or other calls in the weird fashion I'm using them currently.

-- 
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: 2
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: No



More information about the asterisk-code-review mailing list