Implementing the object Cache Framework I. Framework Architecture

Source: Internet
Author: User

Looking at GitHub for a long time about the framework of the cache, but also accumulated some foundation, want to try to write a mysterious caching framework.

First, let's analyze how to get started. What is the framework's broad architecture?

The following is given:

So the frame structure comes out:

1. Zsycache provides some APIs for callers to use all methods of caching

2. Zsycachequeue, Zsycachepool as the structure of the cached data

3. Zsycacheholder Persistent Objects

4. Zsycacheobject wrapping the persisted object related additional properties: Save the NSData of the object, the time when the Record object expires

Note: objects are nskeyedarchiver into NSData and then written to local files, so you need to use the Nscoding protocol to introduce a code--autocoding that automatically implements coding.

Implementing the object Cache Framework I. Framework Architecture

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.