the effect of registration of cache ID and it's mechanism

User 22c88daf92

07-12-2012 01:54:27

hello!


We have three questions about cache ID:


1,  How to use the registration of cache ID, is there any full examples in java? We only find the segment as following:


String identifier = "unique_cache_identifier";
CacheRegistrationUtil.setPermanentCacheID(identifier);

2.  What's the advantage of using registration of cache ID? If we set: "jcSearchOptions.setCacheRegistrationNeeded(false)"   , What's the disadvantages?


3.  what's the mechanism of  cache ID?


thanks!

ChemAxon d9cc14700b

07-12-2012 10:16:25

Hi,


Please find the relevant information in the documentation: http://www.chemaxon.com/jchem/doc/dev/java/intro/index.html#cachereg.


In short, JChemSearch keeps a cache about the structures in the database for performance reasons. The cache registration mechanism is used to keep the cache up-to-date. If a cache is registered, then a check is done before every search to ensure that the cache is up-to-date, and updated if necessary. Not using cache registration yields in loading the full cache before every search, so it is recommended to use it.


Best Regards,
Gabor 

User 38c1febedf

10-12-2012 08:59:47










ghornyak wrote:

Hi,


Please find the relevant information in the documentation: http://www.chemaxon.com/jchem/doc/dev/java/intro/index.html#cachereg.


In short, JChemSearch keeps a cache about the structures in the database for performance reasons. The cache registration mechanism is used to keep the cache up-to-date. If a cache is registered, then a check is done before every search to ensure that the cache is up-to-date, and updated if necessary. Not using cache registration yields in loading the full cache before every search, so it is recommended to use it.


Best Regards,
Gabor 



Hi,


I'm using "benzen" do a substructure search in 30 thousand compounds, each time spend 9 second ,including using cache registration and not specified cache registraction.


So,i'm confused how to reduce search time when with the same condition?


Does it  associated with of the cache registration?

ChemAxon d9cc14700b

10-12-2012 13:45:32

Hi,


A full cache load may need significant time, but executed only before the first search if you use cache registration. If the structures are not changed later on, then cache update will not be performed so it won't affect search performance. Note that this applies to the lifetime of one JVM (e.g. an application which executes multiple searches on the same table), that is, that cache is lost when the JVM is terminated and needs to be reloaded when it is started.


Best Regards,
Gabor