SetPixelCacheMethods() vs. SyncPixelCache() vs. SyncCacheNexus() vs. SyncCacheView()

Wolfgang Spraul <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.core
Organization Q AG
Message-ID <[email protected]>
I noticed some architectural overlap in cache.c/cache_view.c and wasn't sure 
which functions (if any) are "older" vs. "newer", or "preferred" or whatever.
Basically, cache.c:GetCacheInfo() will initialize a set of cache function 
pointers with SetPixelCacheMethods() to point to SyncPixelCache() (for 
example). SyncPixelCache() will then in turn call SyncCacheNexus().
Then, there are the "cache view" functions in cache_view.c, which generally 
seem to be small wrappers that call the "nexus" cache functions family. The 
website doc seems to mention only the cache view functions.
All of those functions are flagged as MagickExport, i.e. meant to be called 
from outside.

Could someone order those functions historically for me, or tell me which 
direction this is going to? What is the "latest" cache API that I should use 
for new codes?

Let's say I want to add another cache type (in addition to DiskCache, 
MemoryCache, MapCache). How should I do this? Should I add it to the existing 
functions in cache.c as new cases, or add new functions and use the function 
pointer setup mechanism?

Thanks,
Wolfgang



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.