Android cache framework ASimpleCache

Source: Internet
Author: User

1. What can it cache?
Common strings, json, serialized java objects, and byte numbers.

2. What are its characteristics?

Main features:

1: Light, light to only one JAVA file.

2: configurable. You can configure the cache path, cache size, and cache quantity.

3: You can set the cache timeout time. The cache timeout value automatically expires and is deleted.

4: multi-process support.

3. What scenarios can it be used in android?

1. Replace SharePreference as the configuration file

2.: Network request data can be cached. For example, the android client of oschina can cache the news content of http requests. The cache time is assumed to be 1 hour and will automatically expire after timeout, allow the client to request new data to reduce Client Traffic and server concurrency.

3. Tell me

4. How to Use ASimpleCache?

The following is a small demo that you would like:

 
  1. ACache mCache = ACache. get (this );
  2. MCache. put ("test_key", "test value ");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.