A new cache entry will be added into the local Cache using this particular method.
Try{ //Fire a HTTP POST IODataEntry entry = buildPostEntry(); ILogger logger = new Logger(); ICache cache =new Cache(getApplicationContext(),logger); String generated_id =cache.addEntry(entry); PerformPostrequest(entry)//Fire HTTP POST request } Catch(CacheException e){ }. public void onSuccess(I Request arg0, I Response aResponse) { ClearLocalEntry(generated_id)//on success of POST request ,application developer clears this entry after all the Cache instances related to this entry (filter/query all matching) are updated from the server }
This method will be mostly called when the application is trying to create entries in the backend via a HTTP POST.