George Joseph wrote:
On Thu, Apr 30, 2015 at 10:29 AM, Joshua Colp <jc...@digium.com
<mailto:jc...@digium.com>> wrote:

    George Joseph wrote:

        Ok, but will the caching wizard support the C,U,D operations as the
        memory wizard does?.


    They could, but the caching infrastructure doesn't currently
    directly expose the mechanism to do that. I'd err on the side of
    using observers for it. The core has specific logic for caching
    because there are no observers on retrieval. As well, the observers
    are only invoked when the operation actually occurs.

Ok, so what would happen if I called ast_sorcery_create with realtime
being the concrete store?  How does the cache stay synchronized?

I'll expand the page to detail this. It would add an observer, which gets called when such things successfully occur. It can trigger cache changes as a result of that. Same for update/delete.

I think ultimately whether that's useful or not depends on the object type itself. In that scenario if it *has* to be reflected immediately and the object type is seeing heavy write you may end up hurting things versus not caching. If it's marked as stale and eventually reconciled then it's less of an impact.

The wiki page was originally written with a focus on read heavy instead.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to