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 7746031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:10:23+00:00 2026-06-01T10:10:23+00:00

I am implementing caching for my website which is using Zend Framework. I look

  • 0

I am implementing caching for my website which is using Zend Framework.

I look into the source code and see that:

Zend_Cache::factory()

always need two configurations of backend and frontend.

And my issue is:

I don’t know why backend is set inside frontend,
and what is the difference between them?

$frontendObject->setBackend($backendObject);
return $frontendObject;

Here is the orginal source code:

public static function factory($frontend, $backend, $frontendOptions = array(), $backendOptions = array(), $customFrontendNaming = false, $customBackendNaming = false, $autoload = false)
{
    if (is_string($backend)) {
        $backendObject = self::_makeBackend($backend, $backendOptions, $customBackendNaming, $autoload);
    } else {
        if ((is_object($backend)) && (in_array('Zend_Cache_Backend_Interface', class_implements($backend)))) {
            $backendObject = $backend;
        } else {
            self::throwException('backend must be a backend name (string) or an object which implements Zend_Cache_Backend_Interface');
        }
    }
    if (is_string($frontend)) {
        $frontendObject = self::_makeFrontend($frontend, $frontendOptions, $customFrontendNaming, $autoload);
    } else {
        if (is_object($frontend)) {
            $frontendObject = $frontend;
        } else {
            self::throwException('frontend must be a frontend name (string) or an object');
        }
    }
    $frontendObject->setBackend($backendObject);
    return $frontendObject;
}
  • 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-06-01T10:10:25+00:00Added an answer on June 1, 2026 at 10:10 am

    The cache backend is the “cache engine” : it can be file, memcached, etc.

    The cache frontend specify what kind of data will be stored in the cache (see http://framework.zend.com/manual/1.12/en/zend.cache.frontends.html)

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

Sidebar

Related Questions

I've been looking into implementing caching at Repository level using the .NET 4.0 Caching
I have a wcf service that is secured using WIF. I'm implementing token caching
I'm implementing object caching in a PHP application using APC. The issue is, that
We are looking at implementing a caching framework for our application to help improve
implementing publishActivity in PHP using the REST API using this code: $activity = array(
I am implementing a caching mechanism. I have written a HTTPModule which would intercept
I am implementing a caching layer between my database and my C# code. The
I'm implementing a PHP script which will need some caching capabilities. I'm trying to
I am implementing caching into my Rails project via Memcached and particularly trying to
I'm implementing some caching by using the nifty Rails.cache.fetch . However, in one particular

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.