Re: How to use smarty cache in cakephp?

2007-02-15 Thread rollenc

Ur meaning is that putting the php code between the 
tags,but not the values. isn't it?

On 2月16日, 下午1时25分, "lloydhome" <[EMAIL PROTECTED]> wrote:
> I only have one page that is cached and has dynamic data on it.  It
> was really messy with Smarty and there are some other features I
> wanted so I have decided to clean it all up.  
> Seehttp://www.lloydhome.com/news/view/5
> for a full explaination.  AS A BONUS, you get the controller's
> beforeFilter() to run before showing cached content - just be careful
> with what you do.  It should be used to authenticate that the cache is
> available to the user.
>
> The short answer for those searching in the future: You have to set
> the $this->_tpl_vars array to the variables you want accessed.  This
> can only be set if it is empty (cached case).  This is a hoop to go
> through but the alternative is usually a worse set of {php} global
> $foo; {/php} .
>
> HTH,
>
> David Lloyd
> --
> lloydhome consulting, inc.http://lloydhome.com
>
> On Feb 14, 8:56 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > As this is using Cake's cache the SAME limitations are applied.
>
> > How is it that 'time' will be set in the view if the controllers are
> > not run?  When it is cached NO CONTROLLERS are run.  NO SMARTY is
> > run.  Only the session variables are available.
>
> > I see in my template it is difficult to get a clean code except in my
> > situation so I will change the SmartyView to have easier caching.  But
> > you still will have to rethink how your variables are accessed.
>
> > I'll reply back soon,
>
> > David Lloyd
> > --
> > lloydhome consultinghttp://lloydhome.com
>
> > On Feb 14, 7:48 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > I am puzzle.
> > > I put the  Tag to layout/index.php And it no use too.
> > > And now, the code
> > >   
> > >   {#$time#}
> > >   
> > >  in /view/index.tpl is parsed as follow in cache file:
> > > _tpl_vars['time']; ?>
>
> > > The value $this->_tpl_vars['time'] is not exist since the smarty
> > > complie not run(cache runed).
>
> > > Can I get a demo?
> > > Tanks.
>
> > > On 2月10日, 下午9时52分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > Quote from previous:
>
> > > >If you use  it should work as long as the tag is in
> > > > the layout file.
>
> > > > That means it is not working in the included views - like yours.  It
> > > > would not work anyway with your case as no controller would run to set
> > > > $time.  The dynamic part must come from session or other outside
> > > > means.
>
> > > > HTH,
>
> > > > David Lloyd
> > > > --
> > > > lloydhome consultinghttp://lloydhome.com
>
> > > > On Feb 9, 10:57 pm, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > > > Thx, But I am puzzle in  part cache.
> > > > > I type this code:
> > > > > controler:
> > > > > var $view = 'Smarty';
> > > > > var $helpers = array('Cache');
> > > > > var $cacheAction = array('index' => 86400, 'view/' => 3600);
> > > > > function index()
> > > > > {
> > > > > $this->set('posts', $this->Test->findAll());
> > > > > $this->set('time', date('H:i:s', time()));
> > > > > }
> > > > > In View
> > > > > {#foreach from=$posts item=post#}
> > > > > {#$post.Test.title#}
> > > > > {#$post.Test.body#}
> > > > > 
> > > > > {#foreachelse#}
> > > > > There is nothing
> > > > > {#/foreach#}
>
> > > > > 
> > > > > {#$time#}
> > > > > 
>
> > > > > Website: {#$smarty.server.SERVER_NAME#}
>
> > > > > Full page is cached. but nocache tag is ommited.
> > > > > And the cache file as this:
> > > > >   
> > > > >   03:46:08
> > > > >   
>
> > > > > These is no parse.And the cache is no useful.
>
> > > > > What is correct?
>
> > > > > On 2月10日, 上午3时12分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > > > I have a SmartyView that handles caching by utilizing cake's page
> > > > > > caching.  It handles full-page caching great.  If you use
> > > > > >  it should work as long as the tag is in the layout
> > > > > > file.  I have need for a cachable, non-static ajax call with no 
> > > > > > layout
> > > > > > and this solution nor cake's default works for me.  So I have an 
> > > > > > idea
> > > > > > for that too but you'll need to be patient.
>
> > > > > > The file is athttp://www.lloydhome.com/files/smarty.ph_.txtandneeds
> > > > > > to be renamed and placed in your /app/views directory.
>
> > > > > > To use in your controller:
>
> > > > > > var $view = 'Smarty';
> > > > > > var $cacheAction = 300;  // 5 minutes
> > > > > > var $helpers = array('Cache');
>
> > > > > > HTH,
>
> > > > > > David Lloyd
> > > > > > --
> > > > > > lloydhome consultinghttp://lloydhome.com
>
> > > > > > On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > I also use Smarty but since it is a View and not recognized by the
> > > > > > > core it is not advantageous to use its caching.  I would argue 
> > > > >

Re: How to use smarty cache in cakephp?

2007-02-15 Thread lloydhome

I only have one page that is cached and has dynamic data on it.  It
was really messy with Smarty and there are some other features I
wanted so I have decided to clean it all up.  See 
http://www.lloydhome.com/news/view/5
for a full explaination.  AS A BONUS, you get the controller's
beforeFilter() to run before showing cached content - just be careful
with what you do.  It should be used to authenticate that the cache is
available to the user.

The short answer for those searching in the future: You have to set
the $this->_tpl_vars array to the variables you want accessed.  This
can only be set if it is empty (cached case).  This is a hoop to go
through but the alternative is usually a worse set of {php} global
$foo; {/php} .

HTH,

David Lloyd
--
lloydhome consulting, inc.
http://lloydhome.com


On Feb 14, 8:56 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
> As this is using Cake's cache the SAME limitations are applied.
>
> How is it that 'time' will be set in the view if the controllers are
> not run?  When it is cached NO CONTROLLERS are run.  NO SMARTY is
> run.  Only the session variables are available.
>
> I see in my template it is difficult to get a clean code except in my
> situation so I will change the SmartyView to have easier caching.  But
> you still will have to rethink how your variables are accessed.
>
> I'll reply back soon,
>
> David Lloyd
> --
> lloydhome consultinghttp://lloydhome.com
>
> On Feb 14, 7:48 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > I am puzzle.
> > I put the  Tag to layout/index.php And it no use too.
> > And now, the code
> >   
> >   {#$time#}
> >   
> >  in /view/index.tpl is parsed as follow in cache file:
> > _tpl_vars['time']; ?>
>
> > The value $this->_tpl_vars['time'] is not exist since the smarty
> > complie not run(cache runed).
>
> > Can I get a demo?
> > Tanks.
>
> > On 2月10日, 下午9时52分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > Quote from previous:
>
> > >If you use  it should work as long as the tag is in
> > > the layout file.
>
> > > That means it is not working in the included views - like yours.  It
> > > would not work anyway with your case as no controller would run to set
> > > $time.  The dynamic part must come from session or other outside
> > > means.
>
> > > HTH,
>
> > > David Lloyd
> > > --
> > > lloydhome consultinghttp://lloydhome.com
>
> > > On Feb 9, 10:57 pm, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > > Thx, But I am puzzle in  part cache.
> > > > I type this code:
> > > > controler:
> > > > var $view = 'Smarty';
> > > > var $helpers = array('Cache');
> > > > var $cacheAction = array('index' => 86400, 'view/' => 3600);
> > > > function index()
> > > > {
> > > > $this->set('posts', $this->Test->findAll());
> > > > $this->set('time', date('H:i:s', time()));
> > > > }
> > > > In View
> > > > {#foreach from=$posts item=post#}
> > > > {#$post.Test.title#}
> > > > {#$post.Test.body#}
> > > > 
> > > > {#foreachelse#}
> > > > There is nothing
> > > > {#/foreach#}
>
> > > > 
> > > > {#$time#}
> > > > 
>
> > > > Website: {#$smarty.server.SERVER_NAME#}
>
> > > > Full page is cached. but nocache tag is ommited.
> > > > And the cache file as this:
> > > >   
> > > >   03:46:08
> > > >   
>
> > > > These is no parse.And the cache is no useful.
>
> > > > What is correct?
>
> > > > On 2月10日, 上午3时12分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > > I have a SmartyView that handles caching by utilizing cake's page
> > > > > caching.  It handles full-page caching great.  If you use
> > > > >  it should work as long as the tag is in the layout
> > > > > file.  I have need for a cachable, non-static ajax call with no layout
> > > > > and this solution nor cake's default works for me.  So I have an idea
> > > > > for that too but you'll need to be patient.
>
> > > > > The file is athttp://www.lloydhome.com/files/smarty.ph_.txtandneeds
> > > > > to be renamed and placed in your /app/views directory.
>
> > > > > To use in your controller:
>
> > > > > var $view = 'Smarty';
> > > > > var $cacheAction = 300;  // 5 minutes
> > > > > var $helpers = array('Cache');
>
> > > > > HTH,
>
> > > > > David Lloyd
> > > > > --
> > > > > lloydhome consultinghttp://lloydhome.com
>
> > > > > On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > > > I also use Smarty but since it is a View and not recognized by the
> > > > > > core it is not advantageous to use its caching.  I would argue that
> > > > > > this it actually better to not try without good reason.  The problem
> > > > > > with this approach is the logic still occurs in the controller ad 
> > > > > > the
> > > > > > only time savings is in rendering the view.
>
> > > > > > The SmartyView doesn't cache the output the way cake wants it but I
> > > > > > have some ideas on that I am going to try...  It will be easy to 

Re: How to use smarty cache in cakephp?

2007-02-14 Thread lloydhome

As this is using Cake's cache the SAME limitations are applied.

How is it that 'time' will be set in the view if the controllers are
not run?  When it is cached NO CONTROLLERS are run.  NO SMARTY is
run.  Only the session variables are available.

I see in my template it is difficult to get a clean code except in my
situation so I will change the SmartyView to have easier caching.  But
you still will have to rethink how your variables are accessed.

I'll reply back soon,

David Lloyd
--
lloydhome consulting
http://lloydhome.com


On Feb 14, 7:48 am, "rollenc" <[EMAIL PROTECTED]> wrote:
> I am puzzle.
> I put the  Tag to layout/index.php And it no use too.
> And now, the code
>   
>   {#$time#}
>   
>  in /view/index.tpl is parsed as follow in cache file:
> _tpl_vars['time']; ?>
>
> The value $this->_tpl_vars['time'] is not exist since the smarty
> complie not run(cache runed).
>
> Can I get a demo?
> Tanks.
>
> On 2月10日, 下午9时52分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > Quote from previous:
>
> >If you use  it should work as long as the tag is in
> > the layout file.
>
> > That means it is not working in the included views - like yours.  It
> > would not work anyway with your case as no controller would run to set
> > $time.  The dynamic part must come from session or other outside
> > means.
>
> > HTH,
>
> > David Lloyd
> > --
> > lloydhome consultinghttp://lloydhome.com
>
> > On Feb 9, 10:57 pm, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > Thx, But I am puzzle in  part cache.
> > > I type this code:
> > > controler:
> > > var $view = 'Smarty';
> > > var $helpers = array('Cache');
> > > var $cacheAction = array('index' => 86400, 'view/' => 3600);
> > > function index()
> > > {
> > > $this->set('posts', $this->Test->findAll());
> > > $this->set('time', date('H:i:s', time()));
> > > }
> > > In View
> > > {#foreach from=$posts item=post#}
> > > {#$post.Test.title#}
> > > {#$post.Test.body#}
> > > 
> > > {#foreachelse#}
> > > There is nothing
> > > {#/foreach#}
>
> > > 
> > > {#$time#}
> > > 
>
> > > Website: {#$smarty.server.SERVER_NAME#}
>
> > > Full page is cached. but nocache tag is ommited.
> > > And the cache file as this:
> > >   
> > >   03:46:08
> > >   
>
> > > These is no parse.And the cache is no useful.
>
> > > What is correct?
>
> > > On 2月10日, 上午3时12分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > I have a SmartyView that handles caching by utilizing cake's page
> > > > caching.  It handles full-page caching great.  If you use
> > > >  it should work as long as the tag is in the layout
> > > > file.  I have need for a cachable, non-static ajax call with no layout
> > > > and this solution nor cake's default works for me.  So I have an idea
> > > > for that too but you'll need to be patient.
>
> > > > The file is athttp://www.lloydhome.com/files/smarty.ph_.txtandneeds
> > > > to be renamed and placed in your /app/views directory.
>
> > > > To use in your controller:
>
> > > > var $view = 'Smarty';
> > > > var $cacheAction = 300;  // 5 minutes
> > > > var $helpers = array('Cache');
>
> > > > HTH,
>
> > > > David Lloyd
> > > > --
> > > > lloydhome consultinghttp://lloydhome.com
>
> > > > On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > > I also use Smarty but since it is a View and not recognized by the
> > > > > core it is not advantageous to use its caching.  I would argue that
> > > > > this it actually better to not try without good reason.  The problem
> > > > > with this approach is the logic still occurs in the controller ad the
> > > > > only time savings is in rendering the view.
>
> > > > > The SmartyView doesn't cache the output the way cake wants it but I
> > > > > have some ideas on that I am going to try...  It will be easy to setup
> > > > > whole page caching but using  will be harder.  I'll post
> > > > > back with what I find.
>
> > > > > David Lloyd
> > > > > --
> > > > > lloydhome consultinghttp://www.lloydhome.com
>
> > > > > On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > > > > I combine smarty & cackephp followng this article: http://
> > > > > > projects.simpleteq.com/CakePHP/smarty.html
> > > > > > but I don't know how to use smarty cache .
> > > > > > Call for help. Thanks.


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



Re: How to use smarty cache in cakephp?

2007-02-14 Thread rollenc

I am puzzle.
I put the  Tag to layout/index.php And it no use too.
And now, the code
  
  {#$time#}
  
 in /view/index.tpl is parsed as follow in cache file:
_tpl_vars['time']; ?>

The value $this->_tpl_vars['time'] is not exist since the smarty
complie not run(cache runed).

Can I get a demo?
Tanks.



On 2月10日, 下午9时52分, "lloydhome" <[EMAIL PROTECTED]> wrote:
> Quote from previous:
>
>If you use  it should work as long as the tag is in
> the layout file.
>
> That means it is not working in the included views - like yours.  It
> would not work anyway with your case as no controller would run to set
> $time.  The dynamic part must come from session or other outside
> means.
>
> HTH,
>
> David Lloyd
> --
> lloydhome consultinghttp://lloydhome.com
>
> On Feb 9, 10:57 pm, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > Thx, But I am puzzle in  part cache.
> > I type this code:
> > controler:
> > var $view = 'Smarty';
> > var $helpers = array('Cache');
> > var $cacheAction = array('index' => 86400, 'view/' => 3600);
> > function index()
> > {
> > $this->set('posts', $this->Test->findAll());
> > $this->set('time', date('H:i:s', time()));
> > }
> > In View
> > {#foreach from=$posts item=post#}
> > {#$post.Test.title#}
> > {#$post.Test.body#}
> > 
> > {#foreachelse#}
> > There is nothing
> > {#/foreach#}
>
> > 
> > {#$time#}
> > 
>
> > Website: {#$smarty.server.SERVER_NAME#}
>
> > Full page is cached. but nocache tag is ommited.
> > And the cache file as this:
> >   
> >   03:46:08
> >   
>
> > These is no parse.And the cache is no useful.
>
> > What is correct?
>
> > On 2月10日, 上午3时12分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > I have a SmartyView that handles caching by utilizing cake's page
> > > caching.  It handles full-page caching great.  If you use
> > >  it should work as long as the tag is in the layout
> > > file.  I have need for a cachable, non-static ajax call with no layout
> > > and this solution nor cake's default works for me.  So I have an idea
> > > for that too but you'll need to be patient.
>
> > > The file is athttp://www.lloydhome.com/files/smarty.ph_.txtandneeds
> > > to be renamed and placed in your /app/views directory.
>
> > > To use in your controller:
>
> > > var $view = 'Smarty';
> > > var $cacheAction = 300;  // 5 minutes
> > > var $helpers = array('Cache');
>
> > > HTH,
>
> > > David Lloyd
> > > --
> > > lloydhome consultinghttp://lloydhome.com
>
> > > On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > > I also use Smarty but since it is a View and not recognized by the
> > > > core it is not advantageous to use its caching.  I would argue that
> > > > this it actually better to not try without good reason.  The problem
> > > > with this approach is the logic still occurs in the controller ad the
> > > > only time savings is in rendering the view.
>
> > > > The SmartyView doesn't cache the output the way cake wants it but I
> > > > have some ideas on that I am going to try...  It will be easy to setup
> > > > whole page caching but using  will be harder.  I'll post
> > > > back with what I find.
>
> > > > David Lloyd
> > > > --
> > > > lloydhome consultinghttp://www.lloydhome.com
>
> > > > On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > > > I combine smarty & cackephp followng this article: http://
> > > > > projects.simpleteq.com/CakePHP/smarty.html
> > > > > but I don't know how to use smarty cache .
> > > > > Call for help. Thanks.


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



Re: How to use smarty cache in cakephp?

2007-02-10 Thread lloydhome

Quote from previous:

   If you use  it should work as long as the tag is in
the layout file.

That means it is not working in the included views - like yours.  It
would not work anyway with your case as no controller would run to set
$time.  The dynamic part must come from session or other outside
means.

HTH,

David Lloyd
--
lloydhome consulting
http://lloydhome.com


On Feb 9, 10:57 pm, "rollenc" <[EMAIL PROTECTED]> wrote:
> Thx, But I am puzzle in  part cache.
> I type this code:
> controler:
> var $view = 'Smarty';
> var $helpers = array('Cache');
> var $cacheAction = array('index' => 86400, 'view/' => 3600);
> function index()
> {
> $this->set('posts', $this->Test->findAll());
> $this->set('time', date('H:i:s', time()));
> }
> In View
> {#foreach from=$posts item=post#}
> {#$post.Test.title#}
> {#$post.Test.body#}
> 
> {#foreachelse#}
> There is nothing
> {#/foreach#}
>
> 
> {#$time#}
> 
>
> Website: {#$smarty.server.SERVER_NAME#}
>
> Full page is cached. but nocache tag is ommited.
> And the cache file as this:
>   
>   03:46:08
>   
>
> These is no parse.And the cache is no useful.
>
> What is correct?
>
> On 2月10日, 上午3时12分, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > I have a SmartyView that handles caching by utilizing cake's page
> > caching.  It handles full-page caching great.  If you use
> >  it should work as long as the tag is in the layout
> > file.  I have need for a cachable, non-static ajax call with no layout
> > and this solution nor cake's default works for me.  So I have an idea
> > for that too but you'll need to be patient.
>
> > The file is athttp://www.lloydhome.com/files/smarty.ph_.txtandneeds
> > to be renamed and placed in your /app/views directory.
>
> > To use in your controller:
>
> > var $view = 'Smarty';
> > var $cacheAction = 300;  // 5 minutes
> > var $helpers = array('Cache');
>
> > HTH,
>
> > David Lloyd
> > --
> > lloydhome consultinghttp://lloydhome.com
>
> > On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > > I also use Smarty but since it is a View and not recognized by the
> > > core it is not advantageous to use its caching.  I would argue that
> > > this it actually better to not try without good reason.  The problem
> > > with this approach is the logic still occurs in the controller ad the
> > > only time savings is in rendering the view.
>
> > > The SmartyView doesn't cache the output the way cake wants it but I
> > > have some ideas on that I am going to try...  It will be easy to setup
> > > whole page caching but using  will be harder.  I'll post
> > > back with what I find.
>
> > > David Lloyd
> > > --
> > > lloydhome consultinghttp://www.lloydhome.com
>
> > > On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > > I combine smarty & cackephp followng this article: http://
> > > > projects.simpleteq.com/CakePHP/smarty.html
> > > > but I don't know how to use smarty cache .
> > > > Call for help. Thanks.


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



Re: How to use smarty cache in cakephp?

2007-02-09 Thread rollenc

Thx, But I am puzzle in  part cache.
I type this code:
controler:
var $view = 'Smarty';
var $helpers = array('Cache');
var $cacheAction = array('index' => 86400, 'view/' => 3600);
function index()
{
$this->set('posts', $this->Test->findAll());
$this->set('time', date('H:i:s', time()));
}
In View
{#foreach from=$posts item=post#}
{#$post.Test.title#}
{#$post.Test.body#}

{#foreachelse#}
There is nothing
{#/foreach#}


{#$time#}


Website: {#$smarty.server.SERVER_NAME#}

Full page is cached. but nocache tag is ommited.
And the cache file as this:
  
  03:46:08
  

These is no parse.And the cache is no useful.

What is correct?



On 2月10日, 上午3时12分, "lloydhome" <[EMAIL PROTECTED]> wrote:
> I have a SmartyView that handles caching by utilizing cake's page
> caching.  It handles full-page caching great.  If you use
>  it should work as long as the tag is in the layout
> file.  I have need for a cachable, non-static ajax call with no layout
> and this solution nor cake's default works for me.  So I have an idea
> for that too but you'll need to be patient.
>
> The file is athttp://www.lloydhome.com/files/smarty.ph_.txtand needs
> to be renamed and placed in your /app/views directory.
>
> To use in your controller:
>
> var $view = 'Smarty';
> var $cacheAction = 300;  // 5 minutes
> var $helpers = array('Cache');
>
> HTH,
>
> David Lloyd
> --
> lloydhome consultinghttp://lloydhome.com
>
> On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
>
> > I also use Smarty but since it is a View and not recognized by the
> > core it is not advantageous to use its caching.  I would argue that
> > this it actually better to not try without good reason.  The problem
> > with this approach is the logic still occurs in the controller ad the
> > only time savings is in rendering the view.
>
> > The SmartyView doesn't cache the output the way cake wants it but I
> > have some ideas on that I am going to try...  It will be easy to setup
> > whole page caching but using  will be harder.  I'll post
> > back with what I find.
>
> > David Lloyd
> > --
> > lloydhome consultinghttp://www.lloydhome.com
>
> > On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > > I combine smarty & cackephp followng this article: http://
> > > projects.simpleteq.com/CakePHP/smarty.html
> > > but I don't know how to use smarty cache .
> > > Call for help. Thanks.


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



Re: How to use smarty cache in cakephp?

2007-02-09 Thread lloydhome

I have a SmartyView that handles caching by utilizing cake's page
caching.  It handles full-page caching great.  If you use
 it should work as long as the tag is in the layout
file.  I have need for a cachable, non-static ajax call with no layout
and this solution nor cake's default works for me.  So I have an idea
for that too but you'll need to be patient.

The file is at http://www.lloydhome.com/files/smarty.ph_.txt and needs
to be renamed and placed in your /app/views directory.

To use in your controller:

var $view = 'Smarty';
var $cacheAction = 300;  // 5 minutes
var $helpers = array('Cache');

HTH,

David Lloyd
--
lloydhome consulting
http://lloydhome.com

On Feb 9, 8:42 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
> I also use Smarty but since it is a View and not recognized by the
> core it is not advantageous to use its caching.  I would argue that
> this it actually better to not try without good reason.  The problem
> with this approach is the logic still occurs in the controller ad the
> only time savings is in rendering the view.
>
> The SmartyView doesn't cache the output the way cake wants it but I
> have some ideas on that I am going to try...  It will be easy to setup
> whole page caching but using  will be harder.  I'll post
> back with what I find.
>
> David Lloyd
> --
> lloydhome consultinghttp://www.lloydhome.com
>
> On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
>
> > I combine smarty & cackephp followng this article: http://
> > projects.simpleteq.com/CakePHP/smarty.html
> > but I don't know how to use smarty cache .
> > Call for help. Thanks.


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



Re: How to use smarty cache in cakephp?

2007-02-09 Thread lloydhome

I also use Smarty but since it is a View and not recognized by the
core it is not advantageous to use its caching.  I would argue that
this it actually better to not try without good reason.  The problem
with this approach is the logic still occurs in the controller ad the
only time savings is in rendering the view.

The SmartyView doesn't cache the output the way cake wants it but I
have some ideas on that I am going to try...  It will be easy to setup
whole page caching but using  will be harder.  I'll post
back with what I find.

David Lloyd
--
lloydhome consulting
http://www.lloydhome.com


On Feb 9, 4:39 am, "rollenc" <[EMAIL PROTECTED]> wrote:
> I combine smarty & cackephp followng this article: http://
> projects.simpleteq.com/CakePHP/smarty.html
> but I don't know how to use smarty cache .
> Call for help. Thanks.


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