symfony/symfony — pull request #5902 by dlsniper (2012-11-03 20:22:09+00:00)
Title: [RFC][WIP][2.2] Cache Component

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #1513, #3211
License of the code: MIT
Documentation PR: ~
Todo:
- feedback from GH;
- implement a CachedObject and methods for saving it in order to be able to save both the needed information as well as metadata for it;
- implement namespaces;
- add tests;
- implement more caching drivers;
- add create documentation PR for the component;
- fix any CS break;
- optimizations?

Hello,

This is an attempt to implement a much needed component in Symfony.

After reading and the thinking about this for the past weeks and knowing the previous discussions about the possible implementation of such a feature I've decided to make something as simple as possible while still allowing for flexibility to extend it as one might see fit.

One could argue that I'm missing cache namespaces, caching locking and so on, but those are subject to discussion / implementation.

I'll try and add the remaining things from the TODO list in the specified order.

Also keep in mind that this is only the component, I've split the bundle into a separate PR to maintain the feedback separated. Also, if it's decided, I'll create a new PR for the implementation of the component in other components/places.

At least for now I don't care about coding style breaks and so on, I think it's the least important thing right now (don't worry, I'll fix everything, if anything, before merging), so please don't comment about it!

As a last thing, I really want to finish this in time for 2.2 release/feature freeze so if you want to help me out, any and all PRs are welcomed.

Thank you!