Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 139
Registered: ‎05-25-2009
My Device: Not Specified

How to store a data in cache?

Dear Friends,

 

          I want to know how to store the data in cache.Is any api's are there to store the data in cache or else we have to use persistent object only to store the cache data.Can u pls clarify this? if u can provide me some code snippet ...

 

 

regards,

s.kumaran

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to store a data in cache?

will RuntimeStore help you.

Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 139
Registered: ‎05-25-2009
My Device: Not Specified

Re: How to store a data in cache?

thanks for ur immediate reply, So we dont want to write any code to store data in cache...It's all automatically done by run time storage is i m correct?...

 

regards,

s.kumaran.

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to store a data in cache?

No.

 

RuntimeStore:

Provides a central location for applications to share information.

Note that the store is not persistent; if the device resets, then information stored in the store will be lost.


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 17,019
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to store a data in cache?

what should your cache do? work for network connections?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 139
Registered: ‎05-25-2009
My Device: Not Specified

Re: How to store a data in cache?

Actually i m downloading some tables from the webservices..While accesing that table after some time either that tables are taken from the cache or from the webservice.If it is taken from the cache means, we have to write separate code for that to get table from cache.

 

 

regards,

s.kumaran.

Highlighted
Developer
Posts: 17,019
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to store a data in cache?

you can use hashcodes for your requests and return the result of a webservice from a cache instead of establishing a real connection.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter