Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7180485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:21:32+00:00 2026-05-28T17:21:32+00:00

With the Zend Data Cache – PHP API , is there a method for

  • 0

With the Zend Data Cache – PHP API, is there a method for retrieving all keys in a namespace?

Essentially, I need to replicate what you can do with apc_cache_info, such as

$info = apc_cache_info("user");
$keys = array();

foreach ($info["cache_list"] as $entry) {
    $keys[] = $entry["info"];
}

It is not apparent from the documentation if this is possible.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:21:33+00:00Added an answer on May 28, 2026 at 5:21 pm

    The Zend File Backend supports getTags() and getIds()

    class Zend_Cache_Backend_File
    {
        ....
        /**
         * Return an array of stored tags
         *
         * @return array array of stored tags (string)
         */
        public function getTags()
        {
            return $this->_get($this->_options['cache_dir'], 'tags', array());
        }
        /**
         * Return an array of stored tags
         *
         * @return array array of stored tags (string)
         */
        public function getTags()
        {
            return $this->_get($this->_options['cache_dir'], 'tags', array());
        }
    

    In my bootstrap file i init the cache

    protected function _initCache()
    {
        $frontendOptions = array(
            'lifetime' => 3600*24*5, // cache lifetime of 5 days
            'automatic_serialization' => true,
            'logging' => false,
            'caching' => true
        );
    
        $backendOptions = array(
            'cache_dir' => './../data/cache/', // Directory where to put the cache files
            'hashed_directory_level' => 2
        );
    
        // getting a Zend_Cache_Core object
        $cache = Zend_Cache::factory(
            'Core',
            'File',
            $frontendOptions,
            $backendOptions);
        Zend_Registry::set('cache', $cache); 
    

    Then in my controller i can call

    public function indexAction()
    {
        $cache = Zend_Registry::get('cache');
        Zend_Debug::dump($cache->getTags());
        Zend_Debug::dump($cache->getIds());
    

    Suggest you check the Zend code for the specific cache backend your using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to PHP and Zend, and I would like to cache sensitive data
I am using the Zend PHP Gdata API for Youtube to retrieve data and
I am using following zend code to select all data from a table where
How can I save data in unpublic google spreadsheet in PHP without using Zend
Is there a best practice in getting data from multiple database tables using Zend?
Looking for an example of storing session data in a database, using the Zend
The Zend Framework coding standard mentions the following: For files that contain only PHP
I am trying to use xcache with zend framework to cache the metadata from
I am trying to access the YouTube API with the Zend libraries that I
I am working on a project that pulls data from JMS queue using PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.