New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide support for Zend/Cache and Doctrine/Cache? #2

Closed
lsmith77 opened this Issue Oct 28, 2011 · 8 comments

Comments

Projects
None yet
5 participants
@lsmith77
Copy link

lsmith77 commented Oct 28, 2011

wondering if it would make sense to bring both cache layers under one interface inside a Bundle that lets you choose to use either one. Doctrine's cache layer is part of Doctrine\Common, which is already included in most Symfony2 apps.

@FractalizeR

This comment has been minimized.

Copy link

FractalizeR commented Mar 24, 2012

The problem is that Doctrine is an optional part of Symfony now. You can use Propel instead of Doctrine, for example. So, you shouldn't rely on Doctrine presence that much if you want a component working in all variants of Symfony.

@jmccaffrey42

This comment has been minimized.

Copy link

jmccaffrey42 commented May 7, 2012

You need doctrine-common to have annotations because Symfony rightly does not "reinvent the wheel" and instead uses the already existing annotation parser included there. Based on this, it is pretty much guaranteed that you will have doctrine-common installed, as most of the extended framework uses annotations and requires it, even if you do not use Doctrine DBAL or the ORM.

Also you are either using the Doctrine cache classes or Zend Cache in this case, with Doctrine you are adding zero dependencies most of the time, where as with Zend Cache you are adding two dependencies (Zend_Cache and Zend_Filter) 100% of the time.

Based on that, it is preferable to use Doctrine, don't you think?

@ivoba

This comment has been minimized.

Copy link

ivoba commented Jul 5, 2012

Afaik Doctrine Commons up to Version 2.2 doesnt support a simple FileCache, just APC, memcache and some more.
There is a FileCache in master but i am not sure if that is complete yet.

I think caching file based is pretty central for a lot of people.

@ivoba

This comment has been minimized.

Copy link

ivoba commented Jul 6, 2012

sorry in symfony standard edition there already is Doctrine/Commons/PhpFileCache . i just replaced the ZendCache with it in my project :).

@ghost

This comment has been minimized.

Copy link

ghost commented Jul 29, 2012

@ivoba Could you clarify? As it seems Doctrine/Common/Cache/PhpFileCache is available in doctrine common master, not in 2.2 version (included in symfony-standard). Would be great if you can give me some more details.

@lsmith77

This comment has been minimized.

Copy link

lsmith77 commented Jul 29, 2012

in the mean time i created LiipDoctrineCacheBundle

@ivoba

This comment has been minimized.

Copy link

ivoba commented Jul 30, 2012

@mheleniak thats right. If you need FileCache or PHPFileCache you will need to use Doctrine/Commons > 2.2. indeed.
If you use Symony 2.1.- dev (which is used in symfony-standard master, afaik) you already have the latest. Doctrine/Commons and can use all Cache types.
The Commons version of Standard Edition 2 is too old for PHPFileCache.
Version confusion.

@lsmith77
nice

@stloyd

This comment has been minimized.

Copy link
Contributor

stloyd commented Jan 11, 2013

This project is no longer maintained by KnpLabs. Also we would recommend to use LiipDoctrineCacheBundle instead.

@stloyd stloyd closed this Jan 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment