Hi,

just wanted to put in my 2c.

On 30 May 2012 16:21, Nischay Nahata <nischay...@gmail.com> wrote:
> Right now I am still working on the ground level i.e. the smwStore as many
> things can be optimized there; for e.g. on each page edit all the smw data
> is rewritten to the database even if nothing was changed.

I am really looking forward to this. I had to implement something like
this today to figure out if a cache purge was necessary after some
property changed. Would be great, if you could build in a hook that is
called on change. (James: Working on caching in SemanticGlossary right
now. Will probably contact you later today.)


>> > The cache object is generated using the $wgMemc class
>>
>> I'm in favor of using wfGetCache( CACHE_ANYTHING ).
>
> Why? wgMemc works whether you use Memc or not. And memc gives the best
> performance.

Globals are evil. However, instead of a fixed wfGetCache(
CACHE_ANYTHING ), why not use wfGetMainCache()?
Or better yet, something like $cache = ($smwgCacheType !== null)?
wfGetCache( $smwgCacheType ):wfGetMainCache();
This way people could specify their preferred cache type in
$smwgCacheType and if they did not, you'd fall back on the main cache.

I would probably also replace the expiry time of 60 * 60 by some
configurable value. IMHO if you can ensure that you invalidate the
cache when necessary, there should not be a reason to have an expiry
time at all. Or do I miss something here?

Cheers,
Stephan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to