May I ask Zend_cache?

Source: Internet
Author: User
Ask Zend_cache how to deal with
Recently in the study of PHP cache database data problems, has been using the Zend Framework, there are zend_cache cache classes, directly to take over, now is a bit of a problem.
A user table needs to be cached:
The main code is as follows:
$memcache =zend_registry::get (' memcache ');

if (! $admindata = $memcache->load (' data ')) {
$m _admin = new Model_admin ();
$admindata = $m _admin->getalladmin ();

$memcache->save ($admindata, ' data ');

}
A cached content labeled ' data ' is cached as above.
The difficulty is that how to update this cache will be better, the user volume of this table is quite a lot of, some properties are also in this user table, so the whole table is still quite large. Does it mean that I have a user who has changed some of the information, then I've cleared the entire cache and saved it? Or do I update this user's information separately? (If this is the case, how to deal with it?) )? Or do you have any other ways of dealing with the heroes, please?

Cache Zend Database


------Solution--------------------
This cache is designed to be much thinner, depends on your data size and update frequency.
The cache is too thick to cause the update to be too fast

  • 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.