<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Latest snippets tagged propel cache</title>
  <link rel="alternate" href="http://snippets.prendreuncafe.com/snippets/tagged/propel+cache/order_by/date"></link>
  <id>http://snippets.prendreuncafe.com/snippets/tagged/propel+cache/order_by/date</id>
  <updated>2007-01-17T10:26:22Z</updated>
  <author>
    <name>Symfony</name>
    <author_email>noreply@symfony-project.com</author_email>
  </author>
<entry>
  <title>[Symfony] Cacher un objet Propel sérialisé</title>
  <link href="http://snippets.prendreuncafe.com/snippet/43"></link>
  <updated>2007-01-17T10:26:22Z</updated>
  <id>43</id>
  <summary type="html">Peut être utile pour les gros objets couteux et utilisés souvent.

[code]
$key = md5('myPropelObjectKey');
$cache = new sfProcessCache();
if ($cache-&gt;has($key)) 
{
  $obj = unserialize($cache-&gt;get($key));
}
else
{
  $obj = Table::doSelect();
  $cache-&gt;set($key, serialize($obj))
}
[/code]</summary>
</entry>
</feed>