Cache v1
Share   astrientfoundation - Thursday September 3, 2009 18:36 UTC - http://hostj2me.com/a/7vn
http://www.hostj2me.com/d/9353/10211/cache.jar (browse)

This JAR file contains the caching code used in HostJ2ME.com and CliqCafe. There are several variations of caching and each variation is employed in HostJ2ME.com to increase efficiency.

For example, all file download requests pass through a GdsCache which caches the bytes of files on disk in memory for quick access.

GdsCache cache = ...
GdsCacheObject object = cache.getGdsCacheObject(path);
if (object == null)
{
object = new GdsCacheObject(path);
cache.put(path, object);
}

object.writeTo(os);

Caching is also used extensively when retrieving records from the HostJ2ME.com database.

List<Record> records = (List<Record>)cache.get(key);
if ( records == null )
{
//get from database
cache.put(key,records);
}

report this application
Total Accounts: 100,493
Total Applications: 6,489
Total Files: 218,693
Total Downloads: 6,553,771
Total Stored: 15.69GB
IndiDictionary(Eng-Eng)
by ashishi
IndiDictionary(Eng-Mar)
by ashishi
IndiDictionary(Eng-Hindi)
by ashishi
Caccia al Quadro
by mikesac
Naija Lyrics Wiki - ME
by trinisoftinc
Advertising  /  Build  /  Terms  /  Comments  /  Libraries  /  Devices  /  Clients  /  Forum  /  blog  /  xhtml
Consulting - Buy, Run, Invest - ©2011 Astrient Labs, LLC 
Buy, Run, Invest Consulting