I'm not sure if this is the case with sf 1.0, but in 1.1 and 1.2 you can do
something like the following in one of your templates:


<?php

// The $cache_key can be in any format you want really.
$cache_key = 'paramX='.$paramX.' :: paramY='.$paramY;

// How long to cache the data for, in seconds.
$cache_lifetime = 600; // 600 = 10 minutes

if (!cache($cache_key, $cache_lifetime))
{
?>

<div>
Blah blah blah...<?php echo $paramX; ?> blind mice and <?php echo $paramY;
?> glasses of milk.
</div>

<?php
  cache_save();
}



Does that help you?




2008/12/10 Sumedh <[EMAIL PROTECTED]>

>
> Anyone here? :|
>
> On Dec 8, 5:04 pm, Sumedh <[EMAIL PROTECTED]> wrote:
> > Hi Friends,
> >
> > I've an AJAX request like -
> >
> > http://www.example.com/getData?paramX=100&paramY=200
> >
> > This AJAX response is rendered in a DIV in browser...
> >
> > I want to cache this action for given paramX and paramY...I want to
> > store HTML response for this URL and then send the same HTML in case
> > the same URL is received...
> >
> > I am using Symfony 1.0 ...
> >
> > The documentation warns that "Actions called with a POST method or
> > with GET parameters are not cached." but doesn't elaborate on that
> > warning... :(
> >
> > How can I achieve this?
> >
> > Thanks in advance... :)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to