initial docs for caching #7

Merged
merged 3 commits into from Sep 27, 2012

Projects

None yet

3 participants

@lsmith77
Doctrine member

No description provided.

@lsmith77 lsmith77 referenced this pull request in doctrine/dbal-documentation Sep 23, 2012
Merged

initial docs for cache integration #7

@stof stof commented on an outdated diff Sep 27, 2012
en/reference/caching.rst
@@ -0,0 +1,35 @@
+Doctrine Caching
+=================
+
+The Doctrine Common caching library was born from a need in the
+`Doctrine2 ORM <http://www.doctrine-project.org/projects/orm>`_ to
+allow caching of result sets. The library is independent and can be
+used in your own libraries to caching.
+
+Introduction
+------------
+
+Doctrine caching provides a very simple interface on top of which
@stof
stof Sep 27, 2012

I would say Doctrine Cache provides

@stof stof commented on an outdated diff Sep 27, 2012
en/reference/caching.rst
@@ -0,0 +1,35 @@
+Doctrine Caching
+=================
+
+The Doctrine Common caching library was born from a need in the
+`Doctrine2 ORM <http://www.doctrine-project.org/projects/orm>`_ to
+allow caching of result sets. The library is independent and can be
+used in your own libraries to caching.
+
+Introduction
+------------
+
+Doctrine caching provides a very simple interface on top of which
+several out of the box implementations are provided:
@stof
stof Sep 27, 2012

they are not provided on top of the interface. They are implementing the interface

@stof stof commented on an outdated diff Sep 27, 2012
en/reference/caching.rst
+
+ <?php
+
+ $cache = new \Doctrine\Common\Cache\ArrayCache();
+ $id = $cache->fetch("some key");
+ if (!$id) {
+ $id = do_something();
+ $cache->save("some key", $id);
+ }
+
+ ..
+
+ $cache->contains("some key");
+ $cache->delete("some key");
+
+ // note all cache backends provide stats
@stof
stof Sep 27, 2012

shoudln't it be not ?

@guilhermeblanco guilhermeblanco merged commit cab4440 into master Sep 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment