Re: Cache Help

2013-08-01 Thread Reuben
Oh, nice. My original reply was deleted.

Anyhoo, I might suggest that you only clear the cache for the particular 
Form(s) that were deleted or saved, using Cache::delete('getFormsById' . 
$id).  Although you may need to double check the event of multiple Forms 
being saved or deleted.  I think afterSave() and afterDelete() gets called 
for each entry, but you may want to check, just in case.

Regards
Reuben Helms

On Friday, 2 August 2013 01:48:26 UTC+10, Eric Haskins wrote:
>
> Here is one of my models for dynamic forms. I hope it helps this is 
> CakePHP 2.x  so I clear cache afterSave (editing a forms structure) or 
> afterDelete (selfexplanatory)  
>
> class Forms extends AppModel {
> public $primaryKey = 'id';
> 
> public function afterSave($created) {
> parent::afterSave($created);
> Cache::clear();
> clearCache();
> }
>
> public function  afterDelete() {
> parent::afterDelete();
> Cache::clear();
> clearCache();
> }
> 
> public function getFormsById($id){
> if (($form = Cache::read('getFormsById'.$id)) === false) {
> $form = $this->find('first', array('conditions' => 
> array('Forms.id'=>$id,'Forms.site_id'=> 
>  Configure::read('Settings.site_id';
> Cache::write('getFormsById'.$id, $form);
> }
> return $form;
> }
> }
>
> Hope this helps.  I am new to Cake cache so if I am wrong someone please 
> feel free to point it out
>
> Eric Haskins
> High Octane Brands LLC
> "Building Brands Not Just Business"
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache Help

2013-08-01 Thread Eric Haskins
Here is one of my models for dynamic forms. I hope it helps this is CakePHP 
2.x  so I clear cache afterSave (editing a forms structure) or afterDelete 
(selfexplanatory)  

class Forms extends AppModel {
public $primaryKey = 'id';

public function afterSave($created) {
parent::afterSave($created);
Cache::clear();
clearCache();
}

public function  afterDelete() {
parent::afterDelete();
Cache::clear();
clearCache();
}

public function getFormsById($id){
if (($form = Cache::read('getFormsById'.$id)) === false) {
$form = $this->find('first', array('conditions' => 
array('Forms.id'=>$id,'Forms.site_id'=> 
 Configure::read('Settings.site_id';
Cache::write('getFormsById'.$id, $form);
}
return $form;
}
}

Hope this helps.  I am new to Cake cache so if I am wrong someone please 
feel free to point it out

Eric Haskins
High Octane Brands LLC
"Building Brands Not Just Business"

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache Help

2013-07-29 Thread jmn2k1
You must "invalidate" the cache, ie, delete the cache in a onSave callback.

On Friday, July 26, 2013 9:05:30 PM UTC-3, advantage+ wrote:
>
> Maybe I was reading wrong but I was under the impression if you cache an 
> object (find data) if it was different it would delete the original cached 
> data.
>
>  
>
> I am caching the results of a find, but as admin if I edit the record the 
> cached data is always returned not the new data.
>
>  
>
> Is ther a way to fetch new data after save and delete cached info?
>
>  
>
> *Dave Maharaj*
>
> *Freelance Designer | Developer*
> [image: Description: header_logo]
> www.movepixels.com  |  d...@movepixels.com   |  709.800.0852
>
>  
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache Help

2013-07-28 Thread Reuben
I must admit, I've never cached model data. I figure the database engine 
will be better at caching data for quick (and often) retrieval in its 
buffers.  But I have done caching of results of web services, and the 
occasional view.

If you had to do caching of model data, then I would recommend clearing the 
relevant caches in the afterSave() and afterDelete() methods.  And even 
then, you should only need to clear the entry for the specific cached 
record.  You just need to make sure you an reproduce the key that you're 
using to save the data from the afterSave and afterDelete locations.

Regards
Reuben Helms

On Saturday, 27 July 2013 10:05:30 UTC+10, advantage+ wrote:
>
> Maybe I was reading wrong but I was under the impression if you cache an 
> object (find data) if it was different it would delete the original cached 
> data.
>
>  
>
> I am caching the results of a find, but as admin if I edit the record the 
> cached data is always returned not the new data.
>
>  
>
> Is ther a way to fetch new data after save and delete cached info?
>
>  
>
> *Dave Maharaj*
>
> *Freelance Designer | Developer*
> [image: Description: header_logo]
> www.movepixels.com  |  d...@movepixels.com   |  709.800.0852
>
>  
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache Implement on ACL

2013-05-23 Thread rchavik


On Thursday, 23 May 2013 22:10:32 UTC+7, Yasir Arafat wrote:
>
> Hello,
> I have used ACL in an application. It was fine when there were very few 
> functionality but day by day as the functionalities are increased the load 
> time is also increasing. I make sure about 
>
>
>
>- *D**atabase is normalized properly*
>- *I**ndex field properly*
>- *T**able engine is innoDB*. 
>
>
> I get little improvement but that's not sufficient. So i think if i can 
> implement cache on ACL that will help me
>
> So i need help on implementing ACL or if you have any other suggesions.
>
>
Maybe 
https://github.com/croogo/croogo/blob/1.5/Plugin/Acl/Controller/Component/Auth/AclCachedAuthorize.php
 
could be used/modified as a starting point.

 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache::clearGroup in model and component building cache again

2013-02-26 Thread LDSign
Just one addition: The "unlink"-error is the same when I use the
AutoCache-Plugin instead of the component-logic above...

On Feb 26, 6:50 pm, LDSign  wrote:
> Hi
>
> I have ran into a problem which drives me crazy :(
>
> Ive a component which is used on every page to build the navigation for
> every individual user. The navigation is database driven so caching is a
> good idea - so far so good
>
> The cache is built in the startup-callback of the component like so
> (package and agent is just an example):
>
> > public function initialize(Controller $controller) {
> > parent::initialize($controller);
> > $package = Cache::read($this->Auth->user('id'),'packages');
>
> > if (!$package) {
> > $agent = ClassRegistry::init('Agent')->find('first',array('conditions' =>
> > array('Agent.id' => $this->Auth->user('Company.agent_id';
>
> > if (!empty($agent)) {
> > Cache::write($this->Auth->user('id'), $agent['Package'],'packages');
> > }
> > }
> > }
>
> This works as expected (if the cache file does not exist it would be
> generated).
>
> Now, I would like to push the creation of the cache manually when a
> data-change happens. So Ive put an afterSave-callback in the model:
>
> public function afterSave($created) {
>
> > Cache::clearGroup('packages');
> > }
>
> This works too if I test this seperatly. But when I use this "together"
> with the component-callback I will get an error-message:
>
> *Warning* (2): 
> unlink(C:\xampp\htdocs\ebsst\tmp\cache\packages\ebsst_package_73): Permission 
> denied [*CORE\Cake\Cache\Engine\FileEngine.php*, line *368*]
>
> The cache-file is not cleared though. I guess the file is locked by the 
> file-system (Xampp on Windows 7) through the component. I am not sure about 
> the order of these callbacks and how they interfere between models and 
> components. So ive tried different callbacks in both - but no luck.
>
> Do you have a hint to solve this problem or is this a complete false approach?
>
> Thanks,
> Frank

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache errors on Heroku with update to 2.3 but works fine on local?

2013-02-14 Thread Brad Koch
You're correct that Aspen and Bamboo are read only, but that doesn't apply
here because the Cedar stack (which all PHP apps run on) has a writeable
ephemeral file system [1].

Figured out my case though, CakePHP's default .gitignore [2] ignores the
tmp directory.  Therefore, since the entire tmp directory structure didn't
exist, it couldn't write the files it needed into the tmp directory.

So, when starting a new CakePHP app, make sure that you actually commit the
tmp directories into your repository.

[1] https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
[2] https://github.com/cakephp/cakephp/blob/master/.gitignore

On Sat, Feb 9, 2013 at 12:28 PM, Simon Males  wrote:

> Issue is not CakePHP 2.3 specific. Heroku is a read only file system[1].
>
> Though you can write to /tmp. So in core.php, when setting
> Cache::config() update the value of the 'path' key to '/tmp'. I've
> also shared my production Cache::config() settings[2].
>
> [1] https://devcenter.heroku.com/articles/read-only-filesystem
> [2] https://gist.github.com/sime/4746187
>
> On Sat, Feb 9, 2013 at 2:21 PM, Shahruk Khan 
> wrote:
> > Did not resolve the issue as of yet. I tried to change the caching
> engine to
> > Redis but that requires a username / password and I never got past that.
> > I've made a post on the official CakePHP group on Facebook.
> >
> > On Tuesday, January 29, 2013 11:43:10 PM UTC-5, Shahruk Khan wrote:
> >>
> >> I just updated my cake application to 2.3 and I started getting internal
> >> errors on my heroku application.
> >>
> >> Warning (512): /app/www/app/tmp/cache/ is not writable
> >> [CORE/Cake/Cache/Engine/FileEngine.php, line 336]
> >>
> >> Warning (2): file_put_contents(/app/www/app/tmp/logs/error.log)
> >> [http://php.net/function.file-put-contents]: failed to open stream: No
> such
> >> file or directory [CORE/Cake/Log/Engine/FileLog.php, line 88]
> >>
> >>
> >> This works fine on my local server. Any tips?
> >
> > --
> > Like Us on FaceBook https://www.facebook.com/CakePHP
> > Find us on Twitter http://twitter.com/CakePHP
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to cake-php+unsubscr...@googlegroups.com.
> > To post to this group, send email to cake-php@googlegroups.com.
> > Visit this group at http://groups.google.com/group/cake-php?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
>
>
> --
> Simon Males
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Brad Koch

Email: bradkoch2...@gmail.com
Phone: 989-372-1212

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache errors on Heroku with update to 2.3 but works fine on local?

2013-02-09 Thread Simon Males
Issue is not CakePHP 2.3 specific. Heroku is a read only file system[1].

Though you can write to /tmp. So in core.php, when setting
Cache::config() update the value of the 'path' key to '/tmp'. I've
also shared my production Cache::config() settings[2].

[1] https://devcenter.heroku.com/articles/read-only-filesystem
[2] https://gist.github.com/sime/4746187

On Sat, Feb 9, 2013 at 2:21 PM, Shahruk Khan  wrote:
> Did not resolve the issue as of yet. I tried to change the caching engine to
> Redis but that requires a username / password and I never got past that.
> I've made a post on the official CakePHP group on Facebook.
>
> On Tuesday, January 29, 2013 11:43:10 PM UTC-5, Shahruk Khan wrote:
>>
>> I just updated my cake application to 2.3 and I started getting internal
>> errors on my heroku application.
>>
>> Warning (512): /app/www/app/tmp/cache/ is not writable
>> [CORE/Cake/Cache/Engine/FileEngine.php, line 336]
>>
>> Warning (2): file_put_contents(/app/www/app/tmp/logs/error.log)
>> [http://php.net/function.file-put-contents]: failed to open stream: No such
>> file or directory [CORE/Cake/Log/Engine/FileLog.php, line 88]
>>
>>
>> This works fine on my local server. Any tips?
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Simon Males

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache errors on Heroku with update to 2.3 but works fine on local?

2013-02-08 Thread Shahruk Khan
Did not resolve the issue as of yet. I tried to change the caching engine 
to Redis but that requires a username / password and I never got past that. 
I've made a post on the official CakePHP group on Facebook.

On Tuesday, January 29, 2013 11:43:10 PM UTC-5, Shahruk Khan wrote:
>
> I just updated my cake application to 2.3 and I started getting internal 
> errors on my heroku application.
>
> *Warning* (512): /app/www/app/tmp/cache/ is not writable 
> [*CORE/Cake/Cache/Engine/FileEngine.php*, line *336*]
>
> *Warning* (2): file_put_contents(/app/www/app/tmp/logs/error.log) 
> [http://php.net/function.file-put-contents]: failed to open stream: No such 
> file or directory [*CORE/Cake/Log/Engine/FileLog.php*, line *88*]
>
>
> This works fine on my local server. Any tips?
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache errors on Heroku with update to 2.3 but works fine on local?

2013-02-08 Thread Brad Koch
Ran into the same problem with a new Heroku app of ours.  However, we've
been running the file cache on an older app for over a year and never had
problems.  (Both are on the cedar stack.)  Did you ever get to the bottom
of this?

I assume it has something to do with Heroku's philosophy of read-only
source code, but we should have the ephemeral file system so that shouldn't
matter.

On Wed, Jan 30, 2013 at 8:59 AM, Shahruk Khan wrote:

> Here's the thing - Heroku uses EC2, meaning that any files written are
> deleted on Git push. But I think you're right, so I'm gonna contact Heroku
> support the moment I get the chance. Thanks
>
>
> On Wednesday, January 30, 2013 7:51:12 AM UTC-5, Luciano Bargmann wrote:
>>
>> First things first: I am almost sure you have a write permission problem.
>> Have you tried to fix that?
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Brad Koch

Email: bradkoch2...@gmail.com
Phone: 989-372-1212

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache errors on Heroku with update to 2.3 but works fine on local?

2013-01-30 Thread Shahruk Khan
Here's the thing - Heroku uses EC2, meaning that any files written are 
deleted on Git push. But I think you're right, so I'm gonna contact Heroku 
support the moment I get the chance. Thanks 

On Wednesday, January 30, 2013 7:51:12 AM UTC-5, Luciano Bargmann wrote:
>
> First things first: I am almost sure you have a write permission problem. 
> Have you tried to fix that?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cache::cleargroup() doesn't make sense to me

2013-01-17 Thread stork


> But then why does cleargroup() take a config as a parameter which defaults 
> to "default"?
>

Cake needs to know which engine and prefix you want to use for cleargroup().
 

> Am I missing something?
>

You're probably missing ClearCache plugin - it allows to clear cache group 
even if it is specified in cache configurations with different cache 
engines and different prefixes.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cache::delete not working.

2012-07-17 Thread ianemv
More than a year, have you solved or find out a solution to this issue?

On Monday, 23 May 2011 12:44:44 UTC+8, Krissy Masters wrote:
>
> Not sure why it won’t delete.
>
>  
>
> I even handcoded it and put the code in the controller view function to 
> test out that there was a cache key, so I know its being read but nothing.
>
>  
>
> $read_me = Cache::read( 'info_'.$cache_id, 'inmemory');
>
>  
>
> debug($read_me);
>
> //shows full data set check memcache key and yep its there
>
>  
>
>  
>
> Cache::delete( 'info_'.$cache_id, 'inmemory');
>
>  
>
> Still there..no new call to fetch the data to re-cache it it just never 
> deletes.
>
> Debug 0
>
>  
>
> Any ideas?
>
>  
>
>  
>
>  
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache errors

2012-04-01 Thread Jeremy Burns | Class Outfit
Thanks, and for the record, the errors have disappeared.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 1 Apr 2012, at 20:14:04, 0x20h wrote:

> Yeah, odd behavior. FYI it has been switched in 2.x, see
> http://cakephp.lighthouseapp.com/projects/42648/tickets/1988
>  
> 
> Am 01.04.2012 14:22, schrieb Jeremy Burns | Class Outfit:
>> 
>> Thanks - I hadn't realised that was an option. Have set and tested it and 
>> will monitor to see if that resolves it.
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> http://www.classoutfit.com
>> 
>> On 1 Apr 2012, at 11:02:29, 0x20h wrote:
>> 
>>> Have you configured your cache with "lock" => true ?
>>> 
>>> Am 31.03.2012 07:13, schrieb Jeremy Burns:
 Although my site and cache is functioning, my debug log is littered
 with errors similar to this:
 
 2012-03-30 23:45:28 Notice: Notice (8): unserialize() [>>> href='function.unserialize'>function.unserialize]: Error at offset
 4065 of 4085 bytes in [/var/www/clients/client1/_sites/cakes/1_3_13/
 cake/libs/cache/file.php, line 190]
 2012-03-31 04:59:18 Notice: Notice (8): unserialize() [function.unserialize]: Error at
 offset 1056757 of 1056757 bytes in [/var/www/clients/client1/_sites/
 cakes/1_3_13/cake/libs/cache/file.php, line 190]
 
 Anyone got any pointers please?
 
>>> 
>>> 
>>> -- 
>>> Our newest site for the community: CakePHP Video Tutorials 
>>> http://tv.cakephp.org 
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>>> others with their CakePHP related questions.
>>> 
>>> 
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>>> http://groups.google.com/group/cake-php
>> 
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>  
>>  
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache errors

2012-04-01 Thread 0x20h
Yeah, odd behavior. FYI it has been switched in 2.x, see
http://cakephp.lighthouseapp.com/projects/42648/tickets/1988
 

Am 01.04.2012 14:22, schrieb Jeremy Burns | Class Outfit:
> Thanks - I hadn't realised that was an option. Have set and tested it
> and will monitor to see if that resolves it.
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 1 Apr 2012, at 11:02:29, 0x20h wrote:
>
>> Have you configured your cache with "lock" => true ?
>>
>> Am 31.03.2012 07:13, schrieb Jeremy Burns:
>>> Although my site and cache is functioning, my debug log is littered
>>> with errors similar to this:
>>>
>>> 2012-03-30 23:45:28 Notice: Notice (8): unserialize() [>> href='function.unserialize'>function.unserialize]: Error at offset
>>> 4065 of 4085 bytes in [/var/www/clients/client1/_sites/cakes/1_3_13/
>>> cake/libs/cache/file.php, line 190]
>>> 2012-03-31 04:59:18 Notice: Notice (8): unserialize() [>> >function.unserialize]:
>>> Error at
>>> offset 1056757 of 1056757 bytes in [/var/www/clients/client1/_sites/
>>> cakes/1_3_13/cake/libs/cache/file.php, line 190]
>>>
>>> Anyone got any pointers please?
>>>
>>
>>
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>> help others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com
>>  For more options,
>> visit this group at http://groups.google.com/group/cake-php
>
> -- 
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and
> help others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this
> group at http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache errors

2012-04-01 Thread Jeremy Burns | Class Outfit
Thanks - I hadn't realised that was an option. Have set and tested it and will 
monitor to see if that resolves it.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 1 Apr 2012, at 11:02:29, 0x20h wrote:

> Have you configured your cache with "lock" => true ?
> 
> Am 31.03.2012 07:13, schrieb Jeremy Burns:
>> Although my site and cache is functioning, my debug log is littered
>> with errors similar to this:
>> 
>> 2012-03-30 23:45:28 Notice: Notice (8): unserialize() [> href='function.unserialize'>function.unserialize]: Error at offset
>> 4065 of 4085 bytes in [/var/www/clients/client1/_sites/cakes/1_3_13/
>> cake/libs/cache/file.php, line 190]
>> 2012-03-31 04:59:18 Notice: Notice (8): unserialize() [function.unserialize]: Error at
>> offset 1056757 of 1056757 bytes in [/var/www/clients/client1/_sites/
>> cakes/1_3_13/cake/libs/cache/file.php, line 190]
>> 
>> Anyone got any pointers please?
>> 
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache errors

2012-04-01 Thread 0x20h
Have you configured your cache with "lock" => true ?

Am 31.03.2012 07:13, schrieb Jeremy Burns:
> Although my site and cache is functioning, my debug log is littered
> with errors similar to this:
>
> 2012-03-30 23:45:28 Notice: Notice (8): unserialize() [ href='function.unserialize'>function.unserialize]: Error at offset
> 4065 of 4085 bytes in [/var/www/clients/client1/_sites/cakes/1_3_13/
> cake/libs/cache/file.php, line 190]
> 2012-03-31 04:59:18 Notice: Notice (8): unserialize() [function.unserialize]: Error at
> offset 1056757 of 1056757 bytes in [/var/www/clients/client1/_sites/
> cakes/1_3_13/cake/libs/cache/file.php, line 190]
>
> Anyone got any pointers please?
>


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache FileEngine

2011-10-29 Thread Sandreu
Hi.
You're right, windows supports flock i read quickly flock description,
and I mixed up with the non blocant parameters.

Then it should be OK on windows.


On 29 oct, 00:34, 0x20h  wrote:
> Hi Sebastien,
>
> please readhttp://book.cakephp.org/2.0/en/contributing/code.html
> to find out how you can contribute patches.
>
> Am 28.10.2011 15:30, schrieb Sandreu:> Hello,
>
> > I made an increment for file engine system.
> > My problem was that in APC cache, the cache is not shared between CLI
> > and the web app... then I did that with fileEngine using flock... it's
> > not workink on windows.
>
> why would it not work on windows? I didn't find such a hint on the
> flock() docs.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache FileEngine

2011-10-28 Thread 0x20h
Hi Sebastien,

please read
http://book.cakephp.org/2.0/en/contributing/code.html
to find out how you can contribute patches.


Am 28.10.2011 15:30, schrieb Sandreu:
> Hello,
>
> I made an increment for file engine system.
> My problem was that in APC cache, the cache is not shared between CLI
> and the web app... then I did that with fileEngine using flock... it's
> not workink on windows.
why would it not work on windows? I didn't find such a hint on the
flock() docs.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache problem using CakePHP default File config on apache 1.3.x - server crashes

2011-04-20 Thread luke BAKING barker
hi Jon, thanks for your helpful reply.

I am not sure that it is performance, since the site is not really busy as 
yet, but maybe you have something. 

   I wonder if it is my statement to cache index action in my services 
controller for example


that is breaking things,

I might try just having caching on

but no actions. Then gradually add an action in 1 each few days.


My index action you see in actual fact takes an ID and so has about 40 
diffferent pages formed from it.


I put about 15 of these in like so in my controller:  


var $cacheAction = array(

 // 'index/'  => '1 day',

'index/1' => 172800, //2 days

'index/2' => 172800,

'index/3'  => 172800,


(I wonder if it is something like this that somehow forcing a high load on 
the server and then the cache file write is broken as you say.


I really don't know much at all about linux/server related things. 


Do you think another caching system might be a better route - or is File 
cache the most robust? Rather than Memcache etc.


thanks for your help and to people on IRC.


cheers


Luke


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache problem using CakePHP default File config on apache 1.3.x - server crashes

2011-04-20 Thread Jon Bennett
> Hi - no - do you think that would help?
> I tried making the prefix of the cache different in case there was a
> conflict with other caching in the /tmp of the server but that hasn't
> worked, as the site has hung again just now. I will see if I can find some
> info on the lock thing, thanks.

Are you able to increase headroom on the server? More ram/cpu perhaps,
if on a VPS upgrade to the next one up.

If you can, install htop and keep an eye to see what's using the most
processes, php, mysql etc.

What server optimisations do you have in place, APC etc? Have a read
of http://www.pseudocoder.com/blog/8-ways-to-speed-up-cakephp-apps

Sounds like cake is running out of juice during busy periods and
you're getting broken cache files as a consequence. I think your
options are to upgrade your hardware or optimise your application.
It's not really a cake bug, but growing pains, by the sounds of it.

hth

Jon

-- 
jon bennett - www.jben.net - blog.jben.net

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache problem using CakePHP default File config on apache 1.3.x - server crashes

2011-04-19 Thread luke BAKING barker
Hi - no - do you think that would help? 

I tried making the prefix of the cache different in case there was a 
conflict with other caching in the /tmp of the server but that hasn't 
worked, as the site has hung again just now. I will see if I can find some 
info on the lock thing, thanks.

Luke

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache problem using CakePHP default File config on apache 1.3.x - server crashes

2011-04-19 Thread 0x20h
Just a shot in the blue: Have you tried to set the 'lock' => true option
in your Cache::config ?

Am 19.04.2011 15:49, schrieb luke BAKING barker:
> Hi I am using some controller level caching for a few actions on a
> couple of cakePHP sites. both are cake1.3 sites, and are on the same
> VPS, running php 5.2.11 and it has eAccelrator too.
>
> the cache seemed to work for a few days and then both sites became
> unreachable this morning. I restarted the VPS as it had crashed, and
> then the sites still didnt come back up.
>
> I turned debug on to 1 on both and then they worked (implying cache
> issues) - and since cacheing was added just last week to one of them I
> belive it is a caching problem.
>
> I have checked in my error_log for apche and there are segmentation
> faults 11 around the time the server crashed, also child processes
> exiting.
>
> (thanks to theAnachron in IRC for their help in finding this).
>
> I have now set the prefixes to explicitly different things for these 2
> cake apps. Any other suggestions for me to get cache wokring without
> crashing?
>
> Would I be better sidestepping and using MemCache or similar (are
> these more robust?)
>
> sorry for my obvious cache n00b-iness. I want to sue it as the
> performance boost seems great and is suitable for these sites, whose
> content is reasonably static on popular pages.
>
> thanks
>
> boobyW
>
>
>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache Confusion

2011-04-18 Thread cricket
On Mon, Apr 18, 2011 at 10:56 AM, Krissy Masters
 wrote:
> Still no answers to my questions. No one has any insight?
>
> If you cache the whole action ( $cacheAction) then is it to assume you don't
> need to cache the query data or the view since the whole action is cached as
> 1 object? Does 1 cache take precedent over another. The actual action in the
> controller is never hit (if already cached) so you would not need to cache
> the query data in that action?

Yes, that's right. Dispatcher checks if there's a cached file. If yes,
it loads up a View which in turn renders the cached version. No
controller required.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: Cache Confusion

2011-04-18 Thread Krissy Masters
Still no answers to my questions. No one has any insight?

If you cache the whole action ( $cacheAction) then is it to assume you don't
need to cache the query data or the view since the whole action is cached as
1 object? Does 1 cache take precedent over another. The actual action in the
controller is never hit (if already cached) so you would not need to cache
the query data in that action?

Function view ($id) {

//Read cache if empty get the data needed and cache the query data

$cache_data = Cache::read($cache_name);
if (empty($cache_data))
{
$dataModel = $this->Model->find('first');
Cache::write($cache_name, $dataModel, array('config' => 'File',
'duration' => 7200)); //if the action is cached do you need to cache this
data at all?
}
else
{
$dataModel = $cache_data;
}




}

Thanks to anyone who might have some insight!

K

-Original Message-
From: Krissy Masters [mailto:naked.cake.ba...@gmail.com] 
Sent: Thursday, April 07, 2011 9:47 PM
To: 'cake-php@googlegroups.com'
Subject: Cache Confusion

Cache action, query and view/element. So how do you know which to use, when?

Basic example we use Post action => view,  id => 123

We cache the query data from the database so every time that Post is viewed
we simply read the cached data, fine easy enough delete that data cache on
update so we always pull new data.

***But***

If the action is cached do we need to cache the query data also? The view
holds the data so if the view is cached as the final product does cake still
try to get the database query. I guess think of a cascade effect if the
action is cached for x amount of time does that override the view and query
cache since that action and the query inside the action would not even be
run since the total "action" and everything inside is cached whatever is
inside the action should be skipped all together no?

$cacheAction as it sounds would cache everything the action does, all its
thinking, data requests and result if your caching the whole action then you
don't need to cache anything else?

Cacheing you query is just the data from the db in a file / memory wherever
you save it

View just the rendered output with the query data in it

$cacheAction = view/123 => 1 month whatever for a rough example


function view ($id) {

//after initial first time viewing of this page everything inside here would
be completely skipped?
If your caching the total actions end result why would you cache the query
data? Would it not be cached inside the action already?

}

I guess with the available options it can be a bit confusing and knowing
when to use with what and when.

Any insight to clear this up would be great.

Thanks all,

K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: cache action not working

2011-03-23 Thread Krissy Masters
All that is set up correct. Caching works on other models for me. Just
having issues with this 1 data set. Seems like it just does not want to
delete.


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cache action not working

2011-03-23 Thread ava
debug   0
Cache.disable
Cache.check 1

Cache.disable was set to false. However, I reading it returns empty
string



On Mar 22, 11:26 pm, gremlin  wrote:
> Do you have debug set to 0? If you are seeing the query log then you
> likely don't and with a setting of anything higher than 0 the cache is
> cleared on each call to the action.
>
> On Mar 22, 2:27 pm, "André von Arx"  wrote:
>
>
>
>
>
>
>
> > I've tried to cache a controller action without success.
>
> > Here are the settings I've used for cakephp 1.3.7:
>
> > === core.php:
>
> > Cache::config('default', array(
> >         'engine' => 'File',  // required
> >         'duration'=> 3600,   // optional
> >         'probability'=> 100, // opt
> >         'path' => '/usr/local/www/locavores.co/www/dev/app/tmp/cache/',
> >         'prefix' => 'cake_',  // optional
> >         'lock' => false,      // optional
> >         'serialize' => true   // optional
> >         ));
>
> > // path direcotory is writable
>
> > Configure::write('Cache.check', true);
> > Configure::write('Cache.disable', false);
>
> > === controller
>
> > var $helpers = array('Form','Formhint','Time','Cache');
>
> > var $cacheAction = array(
> >    'getRandomImagesG24' => '48000'
> > );
>
> > function getRandomImagesG24() {
> >    $this->cacheAction = true;
> >    return $this->Image->getRandomImagesG24();
>
> > }
>
> > According to the SQL-Log the Image->getRandomImagesG24 being called
> > for each controller action call (getRandomInagesG24).
>
> > Any hints or suggestions?
> > --
> > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> > belohnen Sie mit bis zu 50,- Euro!https://freundschaftswerbung.gmx.de

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cache action not working

2011-03-22 Thread gremlin
Do you have debug set to 0? If you are seeing the query log then you
likely don't and with a setting of anything higher than 0 the cache is
cleared on each call to the action.


On Mar 22, 2:27 pm, "André von Arx"  wrote:
> I've tried to cache a controller action without success.
>
> Here are the settings I've used for cakephp 1.3.7:
>
> === core.php:
>
> Cache::config('default', array(
>         'engine' => 'File',  // required
>         'duration'=> 3600,   // optional
>         'probability'=> 100, // opt
>         'path' => '/usr/local/www/locavores.co/www/dev/app/tmp/cache/',
>         'prefix' => 'cake_',  // optional
>         'lock' => false,      // optional
>         'serialize' => true   // optional
>         ));
>
> // path direcotory is writable
>
> Configure::write('Cache.check', true);
> Configure::write('Cache.disable', false);
>
> === controller
>
> var $helpers = array('Form','Formhint','Time','Cache');
>
> var $cacheAction = array(
>    'getRandomImagesG24' => '48000'
> );
>
> function getRandomImagesG24() {
>    $this->cacheAction = true;
>    return $this->Image->getRandomImagesG24();
>
> }
>
> According to the SQL-Log the Image->getRandomImagesG24 being called
> for each controller action call (getRandomInagesG24).
>
> Any hints or suggestions?
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro!https://freundschaftswerbung.gmx.de

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache filenames messed up

2011-03-15 Thread Sarpidon
It worked!!! Thanks!!!

On Mar 14, 2:51 pm, Sarpidon  wrote:
> Thank you Jeremy. I am going to try that and see...
>
> On Mar 2, 5:08 pm, Jeremy Burns | Class Outfit
>
>  wrote:
> > This has come up before, but the answer is not obvious. Here's a stolen 
> > reply from an earlier post:
>
> > This is actually caused by a bug in the PCRE library on Centos / Red Hat. 
> > See 
> > thishttp://blog.echothis.com/2011/01/27/fixing-cakephp-1-3s-cache-key-err...post
> >   for how to fix it.
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> > On 2 Mar 2011, at 15:07,Sarpidonwrote:
>
> > > Forgot the screenshot
>
> > >http://screencast.com/t/rcvkSlUs
>
> > > --
> > > Our newest site for the community: CakePHP Video 
> > > Tutorialshttp://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp 
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache filenames messed up

2011-03-14 Thread Sarpidon
Thank you Jeremy. I am going to try that and see...

On Mar 2, 5:08 pm, Jeremy Burns | Class Outfit
 wrote:
> This has come up before, but the answer is not obvious. Here's a stolen reply 
> from an earlier post:
>
> This is actually caused by a bug in the PCRE library on Centos / Red Hat. See 
> thishttp://blog.echothis.com/2011/01/27/fixing-cakephp-1-3s-cache-key-err...blog
>  post  for how to fix it.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 2 Mar 2011, at 15:07,Sarpidonwrote:
>
> > Forgot the screenshot
>
> >http://screencast.com/t/rcvkSlUs
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache filenames messed up

2011-03-02 Thread Jeremy Burns | Class Outfit
This has come up before, but the answer is not obvious. Here's a stolen reply 
from an earlier post:

This is actually caused by a bug in the PCRE library on Centos / Red Hat. See 
this 
http://blog.echothis.com/2011/01/27/fixing-cakephp-1-3s-cache-key-error-on-red-hat-and-centos/
 blog post  for how to fix it.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 2 Mar 2011, at 15:07, Sarpidon wrote:

> Forgot the screenshot
> 
> http://screencast.com/t/rcvkSlUs
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache filenames messed up

2011-03-02 Thread Sarpidon
Forgot the screenshot

http://screencast.com/t/rcvkSlUs

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cache key not working

2011-01-27 Thread rkaiser

This is actually caused by a bug in the PCRE library on Centos / Red Hat. 
See this 
http://blog.echothis.com/2011/01/27/fixing-cakephp-1-3s-cache-key-error-on-red-hat-and-centos/
blog post  for how to fix it.
-- 
View this message in context: 
http://cakephp.19694.n2.nabble.com/cache-key-not-working-tp4960573p5967020.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Cache code with APC

2011-01-20 Thread Dr. Loboto
APC caches code automatically if "opcode cache" is enabled there. It
is by default.
If you want to use APC as data cache with Cake you must setup Cake
cache (example exists in config). It will be "user cache" for APC.

On Jan 20, 11:23 am, "Dave Maharaj"  wrote:
> How do you cache the code with APC? How do you cache objects? I view my APC
> Opcode Cache page and it shows all system cache's. Nothing of mine since I
> have not configured it. If it caches the actual php code how do you use
> Cache::write to cache the code?
>
> Maybe I am reading it wrong?
>
> Thanks,
>
> Dave

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: Cache data question / opinion

2010-12-07 Thread Dave Maharaj
Thanks for the insight.

Will do!

Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache data question / opinion

2010-12-07 Thread Miles J
Cache anything that shouldn't be dynamic (example pagination is
dynamic, or user data).

I have some cached files that just represent a number, example:
1234345

Instead of querying the database how many users I have, just cache the
number every 24 hours.

On Dec 7, 1:27 pm, "Dave Maharaj"  wrote:
> Just public opinion question here. When you cache data I'm wondering when is
> not worth cache'ing if it's just a small bit of data to grab from the db.
>
> For example this is a small cached file I have:
>
> 1294435116
>
> a:1:{s:8:"Groupset";a:6:{s:2:"id";s:1:"9";s:5:"group";s:16:"Operations";s:4:
> "name";s:21:"Team
> Unit";s:4:"slug";s:7:"team_unit";s:9:"masters";s:1:"1";s:4:"indi";s:1:"1";}}
>
> Now looking at it I'm wondering is it even worth Caching? Does the process
> to check if its cached /if so if not do this that read  write or get, is
> that more demand that would be to simply just go get it with such a small
> bit of data.
>
> I have full large sets of data with joins / contains that are well worth
> caching since they get viewed over and over so that's a sure winner, but
> these small tid bits got me wondering here.
>
> Thanks,
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache does not delete on UPDATE

2010-12-05 Thread cricket
On Sun, Dec 5, 2010 at 4:40 PM, Bart  wrote:
> I see, thanks!
>
> So, the automagically deletion of cache files on UPDATE only works for
> View-caching and not for Query-cache/Cache-anything.

Yes, that's exactly it. Check the cache directory to find out how Cake
is naming the cache file in question, then add something along the
lines of:

if ($this->Post->save())
{
clearCache('name_of_cache_file', 'views', '');

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache does not delete on UPDATE

2010-12-05 Thread Bart
I see, thanks!

So, the automagically deletion of cache files on UPDATE only works for
View-caching and not for Query-cache/Cache-anything.

I think I mixed those two up.

thanks again!
bart

On Dec 5, 10:35 pm, "Ma'moon"  wrote:
> in the same link that you provided, check the comments for more details
>
> On Sun, Dec 5, 2010 at 4:14 PM, Bart  wrote:
> > This is what I'm referring to:
> >http://book.cakephp.org/view/348/Clearing-the-Cache
>
> > (couldn't find it earlier, sorry)
>
> > On Dec 5, 10:03 pm, Bart  wrote:
> > > It's not Cache:write() that is not behaving as expected.
>
> > > It's $this->Post->save() that is not behaving as expected.
> > > I expect it to delete all cache-files that are related to that
> > > particular Post.
> > > But it doesn't.
>
> > > On Dec 5, 9:22 pm, "Ma'moon"  wrote:
>
> > > > If the cache file does exist && not expired then CakePHP won't
> > overwrite it
> > > > until "at least" one of those 2 conditions remains true, otherwise you
> > have
> > > > to manually delete the cache file and create it, your save operation is
> > not
> > > > changing any of those 2 conditions (removing the original cache file or
> > > > changing its expiry) and hence Cache::write won't behave as you
> > expected!
> > > > On the other hand, as soon as the target cache file gets expired,
> > > > Cache::write() will automatically overwrite the file with the new
> > content!
>
> > > > On Sun, Dec 5, 2010 at 2:57 PM, Bart 
> > wrote:
> > > > > Extra context: writing the cache happens only in the view-action,
> > when
> > > > > a visitor sees the blog.
> > > > > I'm not trying to write during the edit-action, I only save/update to
> > > > > the model. So the Cache::write() and $this->Post->save() happen in 2
> > > > > separate actions.
>
> > > > > I simply expected the cache to be deleted on $this->Post->save();
> > > > > Has this changed since 1.2?
>
> > > > Because then the cache-file got deleted automatically on $this->Post-
>
> > > > > >save();
> > > > > (AND when it expired, but that's a less relevant here).
>
> > > > > thanks for your reaction!
> > > > > I will try it.
>
> > > > > bart
>
> > > > > On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > > > > > Cache files needs to be explicitly deleted by calling
> > Cache::delete() ,
> > > > > make
> > > > > > sure to call it BEFORE calling Cache::write()
>
> > > > > > On Sun, Dec 5, 2010 at 2:41 PM, Bart 
> > wrote:
> > > > > > > Yes, definately. The cache-file is already created (because of
> > > > > > > Cache::write() ) and I can see it appear in my filesystem.
> > > > > > > The way I write the cache is as follows :
>
> > > > > > > $post = null;
> > > > > > > if( ($post = Cache::read('post_'.$id)) === false ){
> > > > > > >        $post = $this->Post->find('first',
> > > > > > > array(  'conditions'=>array('Post.id'=>$id,
> > 'Post.published'=>true),
>
> > > > > > >                    'contain'=>array(
>
> > > > > > >                                            'ChildPost' => array(
>
> > > > > > >                                                    'conditions'
> > =>
> > > > > > > array('published'=>true),
>
> > > > >  'Author','Attachment'
>
> >  ),'Category','Attachment') )
> > > > > );
> > > > > > >        Cache::write('post_'.$id, $post);
> > > > > > > }
> > > > > > > $this->set('post',$post);
>
> > > > > > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > > > > > Are you sure that you are calling Cache::write() ?
>
> > > > > > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart <
> > bart.gloudem...@gmail.com>
> > > > > wrote:
> > > > > > > > > Hi,
>
> > > > > > > > > I'm using CakePHP 1.3.6.
> > > > > > > > > I'm caching queries that retrieve single Posts in my
> > controller.
> > > > > The
> > > > > > > > > cache files are created nicely and I use the default
> > > > > Cache::config().
> > > > > > > > > Now I expect my cache component to delete the cache file as
> > soon as
> > > > > I
> > > > > > > > > edit and save the post. But that doesn't happen.
>
> > > > > > > > > I have tried all debug modes (0,1,2)
> > > > > > > > > I also tried to use the syntax where the id of the Post is
> > included
> > > > > in
> > > > > > > > > the data-array or when it is delivered by saying:
> > > > > > > > > $this->Post->id = $id;
> > > > > > > > > prior to the save action.
> > > > > > > > > The cache files that are created have permission code 666.
> > (might
> > > > > that
> > > > > > > > > be the problem?)
>
> > > > > > > > > Does anyone have an idea what's going wrong?
> > > > > > > > > Thanks a lot!
> > > > > > > > > Bart
>
> > > > > > > > > Check out the new CakePHP Questions
> > sitehttp://cakeqs.organdhelp
> > > > > > > others
> > > > > > > > > with their CakePHP related questions.
>
> > > > > > > > > You received this message because you are subscribed to the
> > Google
> > > > > > > Groups
> > > > > > > > > "CakePHP" group.
> > > > > > > > > To post to this group, send email to
> > cake-php@googlegroups.com
> > > > > > > > > To unsubscribe from this group, send email to

Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma'moon
in the same link that you provided, check the comments for more details

On Sun, Dec 5, 2010 at 4:14 PM, Bart  wrote:

> This is what I'm referring to:
> http://book.cakephp.org/view/348/Clearing-the-Cache
>
> (couldn't find it earlier, sorry)
>
>
>
> On Dec 5, 10:03 pm, Bart  wrote:
> > It's not Cache:write() that is not behaving as expected.
> >
> > It's $this->Post->save() that is not behaving as expected.
> > I expect it to delete all cache-files that are related to that
> > particular Post.
> > But it doesn't.
> >
> > On Dec 5, 9:22 pm, "Ma'moon"  wrote:
> >
> > > If the cache file does exist && not expired then CakePHP won't
> overwrite it
> > > until "at least" one of those 2 conditions remains true, otherwise you
> have
> > > to manually delete the cache file and create it, your save operation is
> not
> > > changing any of those 2 conditions (removing the original cache file or
> > > changing its expiry) and hence Cache::write won't behave as you
> expected!
> > > On the other hand, as soon as the target cache file gets expired,
> > > Cache::write() will automatically overwrite the file with the new
> content!
> >
> > > On Sun, Dec 5, 2010 at 2:57 PM, Bart 
> wrote:
> > > > Extra context: writing the cache happens only in the view-action,
> when
> > > > a visitor sees the blog.
> > > > I'm not trying to write during the edit-action, I only save/update to
> > > > the model. So the Cache::write() and $this->Post->save() happen in 2
> > > > separate actions.
> >
> > > > I simply expected the cache to be deleted on $this->Post->save();
> > > > Has this changed since 1.2?
> >
> > > Because then the cache-file got deleted automatically on $this->Post-
> >
> > > > >save();
> > > > (AND when it expired, but that's a less relevant here).
> >
> > > > thanks for your reaction!
> > > > I will try it.
> >
> > > > bart
> >
> > > > On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > > > > Cache files needs to be explicitly deleted by calling
> Cache::delete() ,
> > > > make
> > > > > sure to call it BEFORE calling Cache::write()
> >
> > > > > On Sun, Dec 5, 2010 at 2:41 PM, Bart 
> wrote:
> > > > > > Yes, definately. The cache-file is already created (because of
> > > > > > Cache::write() ) and I can see it appear in my filesystem.
> > > > > > The way I write the cache is as follows :
> >
> > > > > > $post = null;
> > > > > > if( ($post = Cache::read('post_'.$id)) === false ){
> > > > > >$post = $this->Post->find('first',
> > > > > > array(  'conditions'=>array('Post.id'=>$id,
> 'Post.published'=>true),
> >
> > > > > >'contain'=>array(
> >
> > > > > >'ChildPost' => array(
> >
> > > > > >'conditions'
> =>
> > > > > > array('published'=>true),
> >
> > > >  'Author','Attachment'
> >
> > > > > >
>  ),'Category','Attachment') )
> > > > );
> > > > > >Cache::write('post_'.$id, $post);
> > > > > > }
> > > > > > $this->set('post',$post);
> >
> > > > > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > > > > Are you sure that you are calling Cache::write() ?
> >
> > > > > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart <
> bart.gloudem...@gmail.com>
> > > > wrote:
> > > > > > > > Hi,
> >
> > > > > > > > I'm using CakePHP 1.3.6.
> > > > > > > > I'm caching queries that retrieve single Posts in my
> controller.
> > > > The
> > > > > > > > cache files are created nicely and I use the default
> > > > Cache::config().
> > > > > > > > Now I expect my cache component to delete the cache file as
> soon as
> > > > I
> > > > > > > > edit and save the post. But that doesn't happen.
> >
> > > > > > > > I have tried all debug modes (0,1,2)
> > > > > > > > I also tried to use the syntax where the id of the Post is
> included
> > > > in
> > > > > > > > the data-array or when it is delivered by saying:
> > > > > > > > $this->Post->id = $id;
> > > > > > > > prior to the save action.
> > > > > > > > The cache files that are created have permission code 666.
> (might
> > > > that
> > > > > > > > be the problem?)
> >
> > > > > > > > Does anyone have an idea what's going wrong?
> > > > > > > > Thanks a lot!
> > > > > > > > Bart
> >
> > > > > > > > Check out the new CakePHP Questions
> sitehttp://cakeqs.organdhelp
> > > > > > others
> > > > > > > > with their CakePHP related questions.
> >
> > > > > > > > You received this message because you are subscribed to the
> Google
> > > > > > Groups
> > > > > > > > "CakePHP" group.
> > > > > > > > To post to this group, send email to
> cake-php@googlegroups.com
> > > > > > > > To unsubscribe from this group, send email to
> > > > > > > > cake-php+unsubscr...@googlegroups.com
> 
> >
> > > > 
> 
> >
> >
> > > > > > 
> 
> >
> > > > 
> 
> >
> > > > >>For
> > > > > > more options, visit this group at
> > > > > > > >http://groups.google.com/group/cake-php?hl=en
> >
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > others
> > > > > > with their CakePHP related quest

Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma'moon
cach engines provided by CakePHP caches the results of a model operation, a
suitable use for this case involves caching the results of a heavy DB query,
"view caching" on the other hand is separated subject, view caching is not
done through the cache engines because the format of the cached data in a
view cannot be "json encoded" as it is in the format of an array or an
object, i hope you can read my point

// are engines unsuitable for storing view files. To clear


On Sun, Dec 5, 2010 at 4:14 PM, Bart  wrote:

> This is what I'm referring to:
> http://book.cakephp.org/view/348/Clearing-the-Cache
>
> (couldn't find it earlier, sorry)
>
>
>
> On Dec 5, 10:03 pm, Bart  wrote:
> > It's not Cache:write() that is not behaving as expected.
> >
> > It's $this->Post->save() that is not behaving as expected.
> > I expect it to delete all cache-files that are related to that
> > particular Post.
> > But it doesn't.
> >
> > On Dec 5, 9:22 pm, "Ma'moon"  wrote:
> >
> > > If the cache file does exist && not expired then CakePHP won't
> overwrite it
> > > until "at least" one of those 2 conditions remains true, otherwise you
> have
> > > to manually delete the cache file and create it, your save operation is
> not
> > > changing any of those 2 conditions (removing the original cache file or
> > > changing its expiry) and hence Cache::write won't behave as you
> expected!
> > > On the other hand, as soon as the target cache file gets expired,
> > > Cache::write() will automatically overwrite the file with the new
> content!
> >
> > > On Sun, Dec 5, 2010 at 2:57 PM, Bart 
> wrote:
> > > > Extra context: writing the cache happens only in the view-action,
> when
> > > > a visitor sees the blog.
> > > > I'm not trying to write during the edit-action, I only save/update to
> > > > the model. So the Cache::write() and $this->Post->save() happen in 2
> > > > separate actions.
> >
> > > > I simply expected the cache to be deleted on $this->Post->save();
> > > > Has this changed since 1.2?
> >
> > > Because then the cache-file got deleted automatically on $this->Post-
> >
> > > > >save();
> > > > (AND when it expired, but that's a less relevant here).
> >
> > > > thanks for your reaction!
> > > > I will try it.
> >
> > > > bart
> >
> > > > On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > > > > Cache files needs to be explicitly deleted by calling
> Cache::delete() ,
> > > > make
> > > > > sure to call it BEFORE calling Cache::write()
> >
> > > > > On Sun, Dec 5, 2010 at 2:41 PM, Bart 
> wrote:
> > > > > > Yes, definately. The cache-file is already created (because of
> > > > > > Cache::write() ) and I can see it appear in my filesystem.
> > > > > > The way I write the cache is as follows :
> >
> > > > > > $post = null;
> > > > > > if( ($post = Cache::read('post_'.$id)) === false ){
> > > > > >$post = $this->Post->find('first',
> > > > > > array(  'conditions'=>array('Post.id'=>$id,
> 'Post.published'=>true),
> >
> > > > > >'contain'=>array(
> >
> > > > > >'ChildPost' => array(
> >
> > > > > >'conditions'
> =>
> > > > > > array('published'=>true),
> >
> > > >  'Author','Attachment'
> >
> > > > > >
>  ),'Category','Attachment') )
> > > > );
> > > > > >Cache::write('post_'.$id, $post);
> > > > > > }
> > > > > > $this->set('post',$post);
> >
> > > > > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > > > > Are you sure that you are calling Cache::write() ?
> >
> > > > > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart <
> bart.gloudem...@gmail.com>
> > > > wrote:
> > > > > > > > Hi,
> >
> > > > > > > > I'm using CakePHP 1.3.6.
> > > > > > > > I'm caching queries that retrieve single Posts in my
> controller.
> > > > The
> > > > > > > > cache files are created nicely and I use the default
> > > > Cache::config().
> > > > > > > > Now I expect my cache component to delete the cache file as
> soon as
> > > > I
> > > > > > > > edit and save the post. But that doesn't happen.
> >
> > > > > > > > I have tried all debug modes (0,1,2)
> > > > > > > > I also tried to use the syntax where the id of the Post is
> included
> > > > in
> > > > > > > > the data-array or when it is delivered by saying:
> > > > > > > > $this->Post->id = $id;
> > > > > > > > prior to the save action.
> > > > > > > > The cache files that are created have permission code 666.
> (might
> > > > that
> > > > > > > > be the problem?)
> >
> > > > > > > > Does anyone have an idea what's going wrong?
> > > > > > > > Thanks a lot!
> > > > > > > > Bart
> >
> > > > > > > > Check out the new CakePHP Questions
> sitehttp://cakeqs.organdhelp
> > > > > > others
> > > > > > > > with their CakePHP related questions.
> >
> > > > > > > > You received this message because you are subscribed to the
> Google
> > > > > > Groups
> > > > > > > > "CakePHP" group.
> > > > > > > > To post to this group, send email to
> cake-php@googlegroups.com
> > > > > > > > To unsubscribe from this 

Re: Cache does not delete on UPDATE

2010-12-05 Thread Bart
This is what I'm referring to:
http://book.cakephp.org/view/348/Clearing-the-Cache

(couldn't find it earlier, sorry)



On Dec 5, 10:03 pm, Bart  wrote:
> It's not Cache:write() that is not behaving as expected.
>
> It's $this->Post->save() that is not behaving as expected.
> I expect it to delete all cache-files that are related to that
> particular Post.
> But it doesn't.
>
> On Dec 5, 9:22 pm, "Ma'moon"  wrote:
>
> > If the cache file does exist && not expired then CakePHP won't overwrite it
> > until "at least" one of those 2 conditions remains true, otherwise you have
> > to manually delete the cache file and create it, your save operation is not
> > changing any of those 2 conditions (removing the original cache file or
> > changing its expiry) and hence Cache::write won't behave as you expected!
> > On the other hand, as soon as the target cache file gets expired,
> > Cache::write() will automatically overwrite the file with the new content!
>
> > On Sun, Dec 5, 2010 at 2:57 PM, Bart  wrote:
> > > Extra context: writing the cache happens only in the view-action, when
> > > a visitor sees the blog.
> > > I'm not trying to write during the edit-action, I only save/update to
> > > the model. So the Cache::write() and $this->Post->save() happen in 2
> > > separate actions.
>
> > > I simply expected the cache to be deleted on $this->Post->save();
> > > Has this changed since 1.2?
>
> > Because then the cache-file got deleted automatically on $this->Post-
>
> > > >save();
> > > (AND when it expired, but that's a less relevant here).
>
> > > thanks for your reaction!
> > > I will try it.
>
> > > bart
>
> > > On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > > > Cache files needs to be explicitly deleted by calling Cache::delete() ,
> > > make
> > > > sure to call it BEFORE calling Cache::write()
>
> > > > On Sun, Dec 5, 2010 at 2:41 PM, Bart  wrote:
> > > > > Yes, definately. The cache-file is already created (because of
> > > > > Cache::write() ) and I can see it appear in my filesystem.
> > > > > The way I write the cache is as follows :
>
> > > > > $post = null;
> > > > > if( ($post = Cache::read('post_'.$id)) === false ){
> > > > >        $post = $this->Post->find('first',
> > > > > array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),
>
> > > > >                    'contain'=>array(
>
> > > > >                                            'ChildPost' => array(
>
> > > > >                                                    'conditions' =>
> > > > > array('published'=>true),
>
> > >  'Author','Attachment'
>
> > > > >                                            ),'Category','Attachment') 
> > > > > )
> > > );
> > > > >        Cache::write('post_'.$id, $post);
> > > > > }
> > > > > $this->set('post',$post);
>
> > > > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > > > Are you sure that you are calling Cache::write() ?
>
> > > > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart 
> > > wrote:
> > > > > > > Hi,
>
> > > > > > > I'm using CakePHP 1.3.6.
> > > > > > > I'm caching queries that retrieve single Posts in my controller.
> > > The
> > > > > > > cache files are created nicely and I use the default
> > > Cache::config().
> > > > > > > Now I expect my cache component to delete the cache file as soon 
> > > > > > > as
> > > I
> > > > > > > edit and save the post. But that doesn't happen.
>
> > > > > > > I have tried all debug modes (0,1,2)
> > > > > > > I also tried to use the syntax where the id of the Post is 
> > > > > > > included
> > > in
> > > > > > > the data-array or when it is delivered by saying:
> > > > > > > $this->Post->id = $id;
> > > > > > > prior to the save action.
> > > > > > > The cache files that are created have permission code 666. (might
> > > that
> > > > > > > be the problem?)
>
> > > > > > > Does anyone have an idea what's going wrong?
> > > > > > > Thanks a lot!
> > > > > > > Bart
>
> > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > > others
> > > > > > > with their CakePHP related questions.
>
> > > > > > > You received this message because you are subscribed to the Google
> > > > > Groups
> > > > > > > "CakePHP" group.
> > > > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > > > To unsubscribe from this group, send email to
> > > > > > > cake-php+unsubscr...@googlegroups.com
> > > 
>
> > > > > 
> > > 
> > > >>For
> > > > > more options, visit this group at
> > > > > > >http://groups.google.com/group/cake-php?hl=en
>
> > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > others
> > > > > with their CakePHP related questions.
>
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "CakePHP" group.
> > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > cake-php+unsubscr...@googlegroups.com
> > > >For
> > > more options, visit this group at
> > > > >http://groups.goog

Re: Cache does not delete on UPDATE

2010-12-05 Thread Bart
It's not Cache:write() that is not behaving as expected.

It's $this->Post->save() that is not behaving as expected.
I expect it to delete all cache-files that are related to that
particular Post.
But it doesn't.


On Dec 5, 9:22 pm, "Ma'moon"  wrote:
> If the cache file does exist && not expired then CakePHP won't overwrite it
> until "at least" one of those 2 conditions remains true, otherwise you have
> to manually delete the cache file and create it, your save operation is not
> changing any of those 2 conditions (removing the original cache file or
> changing its expiry) and hence Cache::write won't behave as you expected!
> On the other hand, as soon as the target cache file gets expired,
> Cache::write() will automatically overwrite the file with the new content!
>
> On Sun, Dec 5, 2010 at 2:57 PM, Bart  wrote:
> > Extra context: writing the cache happens only in the view-action, when
> > a visitor sees the blog.
> > I'm not trying to write during the edit-action, I only save/update to
> > the model. So the Cache::write() and $this->Post->save() happen in 2
> > separate actions.
>
> > I simply expected the cache to be deleted on $this->Post->save();
> > Has this changed since 1.2?
>
> Because then the cache-file got deleted automatically on $this->Post-
>
> > >save();
> > (AND when it expired, but that's a less relevant here).
>
> > thanks for your reaction!
> > I will try it.
>
> > bart
>
> > On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > > Cache files needs to be explicitly deleted by calling Cache::delete() ,
> > make
> > > sure to call it BEFORE calling Cache::write()
>
> > > On Sun, Dec 5, 2010 at 2:41 PM, Bart  wrote:
> > > > Yes, definately. The cache-file is already created (because of
> > > > Cache::write() ) and I can see it appear in my filesystem.
> > > > The way I write the cache is as follows :
>
> > > > $post = null;
> > > > if( ($post = Cache::read('post_'.$id)) === false ){
> > > >        $post = $this->Post->find('first',
> > > > array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),
>
> > > >                    'contain'=>array(
>
> > > >                                            'ChildPost' => array(
>
> > > >                                                    'conditions' =>
> > > > array('published'=>true),
>
> >  'Author','Attachment'
>
> > > >                                            ),'Category','Attachment') )
> > );
> > > >        Cache::write('post_'.$id, $post);
> > > > }
> > > > $this->set('post',$post);
>
> > > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > > Are you sure that you are calling Cache::write() ?
>
> > > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart 
> > wrote:
> > > > > > Hi,
>
> > > > > > I'm using CakePHP 1.3.6.
> > > > > > I'm caching queries that retrieve single Posts in my controller.
> > The
> > > > > > cache files are created nicely and I use the default
> > Cache::config().
> > > > > > Now I expect my cache component to delete the cache file as soon as
> > I
> > > > > > edit and save the post. But that doesn't happen.
>
> > > > > > I have tried all debug modes (0,1,2)
> > > > > > I also tried to use the syntax where the id of the Post is included
> > in
> > > > > > the data-array or when it is delivered by saying:
> > > > > > $this->Post->id = $id;
> > > > > > prior to the save action.
> > > > > > The cache files that are created have permission code 666. (might
> > that
> > > > > > be the problem?)
>
> > > > > > Does anyone have an idea what's going wrong?
> > > > > > Thanks a lot!
> > > > > > Bart
>
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > others
> > > > > > with their CakePHP related questions.
>
> > > > > > You received this message because you are subscribed to the Google
> > > > Groups
> > > > > > "CakePHP" group.
> > > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > cake-php+unsubscr...@googlegroups.com
> > 
>
> > > > 
> > 
> > >>For
> > > > more options, visit this group at
> > > > > >http://groups.google.com/group/cake-php?hl=en
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > others
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com
> > >For
> > more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegr

Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma'moon
If the cache file does exist && not expired then CakePHP won't overwrite it
until "at least" one of those 2 conditions remains true, otherwise you have
to manually delete the cache file and create it, your save operation is not
changing any of those 2 conditions (removing the original cache file or
changing its expiry) and hence Cache::write won't behave as you expected!
On the other hand, as soon as the target cache file gets expired,
Cache::write() will automatically overwrite the file with the new content!

On Sun, Dec 5, 2010 at 2:57 PM, Bart  wrote:

> Extra context: writing the cache happens only in the view-action, when
> a visitor sees the blog.
> I'm not trying to write during the edit-action, I only save/update to
> the model. So the Cache::write() and $this->Post->save() happen in 2
> separate actions.
>
> I simply expected the cache to be deleted on $this->Post->save();
> Has this changed since 1.2?
>
Because then the cache-file got deleted automatically on $this->Post-
> >save();
> (AND when it expired, but that's a less relevant here).
>
> thanks for your reaction!
> I will try it.
>
> bart
>
>
> On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> > Cache files needs to be explicitly deleted by calling Cache::delete() ,
> make
> > sure to call it BEFORE calling Cache::write()
> >
> > On Sun, Dec 5, 2010 at 2:41 PM, Bart  wrote:
> > > Yes, definately. The cache-file is already created (because of
> > > Cache::write() ) and I can see it appear in my filesystem.
> > > The way I write the cache is as follows :
> >
> > > $post = null;
> > > if( ($post = Cache::read('post_'.$id)) === false ){
> > >$post = $this->Post->find('first',
> > > array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),
> >
> > >'contain'=>array(
> >
> > >'ChildPost' => array(
> >
> > >'conditions' =>
> > > array('published'=>true),
> >
> > >
>  'Author','Attachment'
> >
> > >),'Category','Attachment') )
> );
> > >Cache::write('post_'.$id, $post);
> > > }
> > > $this->set('post',$post);
> >
> > > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > > Are you sure that you are calling Cache::write() ?
> >
> > > > On Sun, Dec 5, 2010 at 2:28 PM, Bart 
> wrote:
> > > > > Hi,
> >
> > > > > I'm using CakePHP 1.3.6.
> > > > > I'm caching queries that retrieve single Posts in my controller.
> The
> > > > > cache files are created nicely and I use the default
> Cache::config().
> > > > > Now I expect my cache component to delete the cache file as soon as
> I
> > > > > edit and save the post. But that doesn't happen.
> >
> > > > > I have tried all debug modes (0,1,2)
> > > > > I also tried to use the syntax where the id of the Post is included
> in
> > > > > the data-array or when it is delivered by saying:
> > > > > $this->Post->id = $id;
> > > > > prior to the save action.
> > > > > The cache files that are created have permission code 666. (might
> that
> > > > > be the problem?)
> >
> > > > > Does anyone have an idea what's going wrong?
> > > > > Thanks a lot!
> > > > > Bart
> >
> > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > others
> > > > > with their CakePHP related questions.
> >
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "CakePHP" group.
> > > > > To post to this group, send email to cake-php@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > cake-php+unsubscr...@googlegroups.com
> 
> >
> > > 
> 
> >>For
> > > more options, visit this group at
> > > > >http://groups.google.com/group/cake-php?hl=en
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email 

Re: Cache does not delete on UPDATE

2010-12-05 Thread Bart
Extra context: writing the cache happens only in the view-action, when
a visitor sees the blog.
I'm not trying to write during the edit-action, I only save/update to
the model. So the Cache::write() and $this->Post->save() happen in 2
separate actions.

I simply expected the cache to be deleted on $this->Post->save();
Has this changed since 1.2?
Because then the cache-file got deleted automatically on $this->Post-
>save();
(AND when it expired, but that's a less relevant here).

thanks for your reaction!
I will try it.

bart


On Dec 5, 8:45 pm, "Ma'moon"  wrote:
> Cache files needs to be explicitly deleted by calling Cache::delete() , make
> sure to call it BEFORE calling Cache::write()
>
> On Sun, Dec 5, 2010 at 2:41 PM, Bart  wrote:
> > Yes, definately. The cache-file is already created (because of
> > Cache::write() ) and I can see it appear in my filesystem.
> > The way I write the cache is as follows :
>
> > $post = null;
> > if( ($post = Cache::read('post_'.$id)) === false ){
> >        $post = $this->Post->find('first',
> > array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),
>
> >                    'contain'=>array(
>
> >                                            'ChildPost' => array(
>
> >                                                    'conditions' =>
> > array('published'=>true),
>
> >                                                    'Author','Attachment'
>
> >                                            ),'Category','Attachment') ) );
> >        Cache::write('post_'.$id, $post);
> > }
> > $this->set('post',$post);
>
> > On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > > Are you sure that you are calling Cache::write() ?
>
> > > On Sun, Dec 5, 2010 at 2:28 PM, Bart  wrote:
> > > > Hi,
>
> > > > I'm using CakePHP 1.3.6.
> > > > I'm caching queries that retrieve single Posts in my controller. The
> > > > cache files are created nicely and I use the default Cache::config().
> > > > Now I expect my cache component to delete the cache file as soon as I
> > > > edit and save the post. But that doesn't happen.
>
> > > > I have tried all debug modes (0,1,2)
> > > > I also tried to use the syntax where the id of the Post is included in
> > > > the data-array or when it is delivered by saying:
> > > > $this->Post->id = $id;
> > > > prior to the save action.
> > > > The cache files that are created have permission code 666. (might that
> > > > be the problem?)
>
> > > > Does anyone have an idea what's going wrong?
> > > > Thanks a lot!
> > > > Bart
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > others
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com
> > >For
> > more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma'moon
Cache files needs to be explicitly deleted by calling Cache::delete() , make
sure to call it BEFORE calling Cache::write()

On Sun, Dec 5, 2010 at 2:41 PM, Bart  wrote:

> Yes, definately. The cache-file is already created (because of
> Cache::write() ) and I can see it appear in my filesystem.
> The way I write the cache is as follows :
>
> $post = null;
> if( ($post = Cache::read('post_'.$id)) === false ){
>$post = $this->Post->find('first',
> array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),
>
>'contain'=>array(
>
>'ChildPost' => array(
>
>'conditions' =>
> array('published'=>true),
>
>'Author','Attachment'
>
>),'Category','Attachment') ) );
>Cache::write('post_'.$id, $post);
> }
> $this->set('post',$post);
>
> On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> > Are you sure that you are calling Cache::write() ?
> >
> > On Sun, Dec 5, 2010 at 2:28 PM, Bart  wrote:
> > > Hi,
> >
> > > I'm using CakePHP 1.3.6.
> > > I'm caching queries that retrieve single Posts in my controller. The
> > > cache files are created nicely and I use the default Cache::config().
> > > Now I expect my cache component to delete the cache file as soon as I
> > > edit and save the post. But that doesn't happen.
> >
> > > I have tried all debug modes (0,1,2)
> > > I also tried to use the syntax where the id of the Post is included in
> > > the data-array or when it is delivered by saying:
> > > $this->Post->id = $id;
> > > prior to the save action.
> > > The cache files that are created have permission code 666. (might that
> > > be the problem?)
> >
> > > Does anyone have an idea what's going wrong?
> > > Thanks a lot!
> > > Bart
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache does not delete on UPDATE

2010-12-05 Thread Bart
Yes, definately. The cache-file is already created (because of
Cache::write() ) and I can see it appear in my filesystem.
The way I write the cache is as follows :

$post = null;
if( ($post = Cache::read('post_'.$id)) === false ){
$post = $this->Post->find('first',
array(  'conditions'=>array('Post.id'=>$id, 'Post.published'=>true),

'contain'=>array(

'ChildPost' => array(

'conditions' => 
array('published'=>true),

'Author','Attachment'

),'Category','Attachment') ) );
Cache::write('post_'.$id, $post);
}
$this->set('post',$post);

On Dec 5, 8:35 pm, "Ma'moon"  wrote:
> Are you sure that you are calling Cache::write() ?
>
> On Sun, Dec 5, 2010 at 2:28 PM, Bart  wrote:
> > Hi,
>
> > I'm using CakePHP 1.3.6.
> > I'm caching queries that retrieve single Posts in my controller. The
> > cache files are created nicely and I use the default Cache::config().
> > Now I expect my cache component to delete the cache file as soon as I
> > edit and save the post. But that doesn't happen.
>
> > I have tried all debug modes (0,1,2)
> > I also tried to use the syntax where the id of the Post is included in
> > the data-array or when it is delivered by saying:
> > $this->Post->id = $id;
> > prior to the save action.
> > The cache files that are created have permission code 666. (might that
> > be the problem?)
>
> > Does anyone have an idea what's going wrong?
> > Thanks a lot!
> > Bart
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache does not delete on UPDATE

2010-12-05 Thread Ma'moon
Are you sure that you are calling Cache::write() ?

On Sun, Dec 5, 2010 at 2:28 PM, Bart  wrote:

> Hi,
>
> I'm using CakePHP 1.3.6.
> I'm caching queries that retrieve single Posts in my controller. The
> cache files are created nicely and I use the default Cache::config().
> Now I expect my cache component to delete the cache file as soon as I
> edit and save the post. But that doesn't happen.
>
> I have tried all debug modes (0,1,2)
> I also tried to use the syntax where the id of the Post is included in
> the data-array or when it is delivered by saying:
> $this->Post->id = $id;
> prior to the save action.
> The cache files that are created have permission code 666. (might that
> be the problem?)
>
> Does anyone have an idea what's going wrong?
> Thanks a lot!
> Bart
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache config in core.php

2010-10-21 Thread mark_story
The trailing ?> has been omitted from all the all PHP files in Cake
for 1.3, too many headaches with headers already sent errors.

-Mark

On Oct 20, 7:29 am, PaulW  wrote:
> Okay cheers for that, I was looking for "Configure::Cache.check" so a
> text search of the file didn't show it, now I see it is actually
> "Configure::write('Cache.check'" that I should have looked for.
>
> Re the closing tag, I downloaded a fresh copy of 1.3.4 and checked,
> there isn't one but as you say it's probably better that way

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache Flooding

2010-10-20 Thread cricket
On Tue, Oct 19, 2010 at 5:32 PM, woodscreative
 wrote:
> Is it not possible to flood the cache directory if you turn view
> caching on? If a malicious script swamped my server with bogus
> requests that don't throw a 404?
>
> http://www.example.com/var:1
> http://www.example.com/var:2
> http://www.example.com/var:3 etc etc

As long as you have var = x in the DB what's the problem? Any requests
for var = $non_existent should give the same result. IOW, you'd only
ever have as many cached views as you have records in the DB. That can
be many but that's the trade-off with caching.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache config in core.php

2010-10-20 Thread PaulW
Okay cheers for that, I was looking for "Configure::Cache.check" so a
text search of the file didn't show it, now I see it is actually
"Configure::write('Cache.check'" that I should have looked for.

Re the closing tag, I downloaded a fresh copy of 1.3.4 and checked,
there isn't one but as you say it's probably better that way

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache config in core.php

2010-10-19 Thread cricket
On Tue, Oct 19, 2010 at 1:04 PM, Paul Willis  wrote:
> I'm looking into turning on caching for my 1.3.4 site.
>
> In the cookbook 
>  it says "first 
> uncomment and set Configure::Cache.check to true in core.php" but that 
> doesn't appear in my core.php

Perhaps you deleted it. In any case, Configure::write('Cache.check',
true) is what you want. That, and Configure::write('Cache.disable',
false)

> Also while looking at core.php I noticed it's missing the closing ?> php tag 
> is this an error I should report or is this file closed somewhere else in the 
> code?

The stock file does include the closing tag, so, again, perhaps you
(or someone else) deleted it. But its absence is of no consequence. I
generally do not include it because any whitespace after it will often
cause the dreaded "headers already sent" error.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache actions vs elements

2010-10-11 Thread Sarpidon
Thank you for your replies.

I am still somewhat confused. So how do I cache view.ctp ?? it is not
an element, it is displayed through $content_for_layout

I've tried adding  on my elements but it does not seem
to give the result I need.
For example I have this element:

if($this->params['controller'] == 'frontapage'): display image 1 else:
display image 2 endif;


This is not working. When a user requests 'frontpage' the element is
cached with display image 1 and stays like this even if the user
requests another page. If the cache is deleted and the user requests a
page other than the frontpage image 2 is displayed and stays like
this I guess I have to use two different cached elements? Give
them a different key, one for the frontpage and one for the other
pages? But this is not very efficient is it?



On Oct 10, 5:33 pm, euromark  wrote:
> i would include the helper but NOT use the
> var $cacheAction = '1 hour'
>
> now set up your elements and cache them as you did before
>
> this way the page itself should not be cached (no cacheAction
> declared)
> but the elements should!
>
> On 10 Okt., 16:28, calzone  wrote:
>
> > I believe cache action is used to cache the entire request.
>
> > You would have to use nocache on the sections of your ctp file you
> > don't want cached
> > To cache just the elements, you would have to cache the actions
> > associated with each element.
>
> > On Oct 10, 2:42 am, Sarpidon  wrote:
>
> > > Hello.
>
> > > I have this layout
>
> > > 
> > > element(header, array('cache'' => true); ?>
> > > 
> > > element(footer, array('cache'' => true); ?>
> > > 
>
> > > This creates two cache files in tmp/cache/views
>
> > > on a controller I have this:
> > > function view() {
> > > var $cacheAction = '1 hour'
>
> > > }
>
> > > for some reason caching View caches the whole page again, including
> > > header and footer. Is this how is supposed to work? Because this is
> > > causing problems when the element has dynamic content (like latest
> > > news).
> > > I thought caching an action (like view) will only store the contents
> > > of view.ctp and not the whole layout.
>
> > > Am I missing something?
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache actions vs elements

2010-10-10 Thread euromark
i would include the helper but NOT use the
var $cacheAction = '1 hour'

now set up your elements and cache them as you did before

this way the page itself should not be cached (no cacheAction
declared)
but the elements should!


On 10 Okt., 16:28, calzone  wrote:
> I believe cache action is used to cache the entire request.
>
> You would have to use nocache on the sections of your ctp file you
> don't want cached
> To cache just the elements, you would have to cache the actions
> associated with each element.
>
> On Oct 10, 2:42 am, Sarpidon  wrote:
>
>
>
> > Hello.
>
> > I have this layout
>
> > 
> > element(header, array('cache'' => true); ?>
> > 
> > element(footer, array('cache'' => true); ?>
> > 
>
> > This creates two cache files in tmp/cache/views
>
> > on a controller I have this:
> > function view() {
> > var $cacheAction = '1 hour'
>
> > }
>
> > for some reason caching View caches the whole page again, including
> > header and footer. Is this how is supposed to work? Because this is
> > causing problems when the element has dynamic content (like latest
> > news).
> > I thought caching an action (like view) will only store the contents
> > of view.ctp and not the whole layout.
>
> > Am I missing something?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache actions vs elements

2010-10-10 Thread calzone
I believe cache action is used to cache the entire request.

You would have to use nocache on the sections of your ctp file you
don't want cached
To cache just the elements, you would have to cache the actions
associated with each element.

On Oct 10, 2:42 am, Sarpidon  wrote:
> Hello.
>
> I have this layout
>
> 
> element(header, array('cache'' => true); ?>
> 
> element(footer, array('cache'' => true); ?>
> 
>
> This creates two cache files in tmp/cache/views
>
> on a controller I have this:
> function view() {
> var $cacheAction = '1 hour'
>
> }
>
> for some reason caching View caches the whole page again, including
> header and footer. Is this how is supposed to work? Because this is
> causing problems when the element has dynamic content (like latest
> news).
> I thought caching an action (like view) will only store the contents
> of view.ctp and not the whole layout.
>
> Am I missing something?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache

2010-07-16 Thread RhythmicDevil
Thank you.

On Jul 16, 10:02 am, cricket  wrote:
> On Fri, Jul 16, 2010 at 9:59 AM, RhythmicDevil  
> wrote:
> > Ok I get you, that makes more sense. I will look into implementing
> > that.
>
> The more I think about it, the more I want to try it. I might take a
> swing at it this weekend. I'll let you know if I do and can get it to
> work.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 9:59 AM, RhythmicDevil  wrote:
> Ok I get you, that makes more sense. I will look into implementing
> that.

The more I think about it, the more I want to try it. I might take a
swing at it this weekend. I'll let you know if I do and can get it to
work.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache

2010-07-16 Thread RhythmicDevil
Ok I get you, that makes more sense. I will look into implementing
that.

On Jul 16, 9:56 am, cricket  wrote:
> On Fri, Jul 16, 2010 at 9:37 AM, RhythmicDevil  
> wrote:
> > Thanks for the reply.
>
> > The number of channels is variable but always more than a 100.
>
> > I would prefer not to cache in the client as I would still have to
> > serve up an entire days worth of the schedule for every user.
>
> I meant to cache it on the server. You'd only be serving the entire
> day on that user's first request. Any subsequent request for earlier
> or later in the schedule for that day would simply slide the table
> left or right to the correct position.
>
> > I think my best option, if I cant get Cake to do it, is to use Memcache.
>
> Cake works very well with MemCache.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 9:37 AM, RhythmicDevil  wrote:
> Thanks for the reply.
>
> The number of channels is variable but always more than a 100.
>
> I would prefer not to cache in the client as I would still have to
> serve up an entire days worth of the schedule for every user.

I meant to cache it on the server. You'd only be serving the entire
day on that user's first request. Any subsequent request for earlier
or later in the schedule for that day would simply slide the table
left or right to the correct position.

> I think my best option, if I cant get Cake to do it, is to use Memcache.

Cake works very well with MemCache.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache

2010-07-16 Thread RhythmicDevil
Thanks for the reply.

The number of channels is variable but always more than a 100.

I would prefer not to cache in the client as I would still have to
serve up an entire days worth of the schedule for every user. I
definitely have to cache on the server. I think my best option, if I
cant get Cake to do it, is to use Memcache.

On Jul 16, 9:21 am, cricket  wrote:
> On Fri, Jul 16, 2010 at 8:44 AM, RhythmicDevil  
> wrote:
> > Hello,
> > I have a view that shows a television schedule, similar to DirectTVs
> > (http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a list of
> > channels and programs in a 4 hour slice broken into 1/2 hour columns.
> > When the schedule first loads the start time is is the most recent 1/2
> > hour mark. Meaning that if its 7.03am the window will start at 7am. If
> > the time is 7.47am the window will start at 7.30. You are able to page
> > left and right in 1/2 hour chunks.
>
> > I am trying to improve performance of the view, as you can imagine its
> > a ton of data to compile and the HTML is fairly complex. My aim is
> > cache the most current schedule chunk. So assume the time is currently
> > 7.03am. The application gets it's first request for the schedule. The
> > controller fetches the schedule from the model starting at 7.00am and
> > then caches it. All subsequent requests for that particular start time
> > (7am) for all users will use the cached version until 7.30am at which
> > point the cache is cleared and process starts again.
>
> > I have implemented Cake's view caching and set the cache action as
> > follows:
>
> > $this->cacheAction = array('getTvSchedule/' => 1800);
>
> > This causes an obvious problem. If the first request for a schedule
> > comes after a 1/2 hour mark (7am, 7.30am, 8am etc) the cache will
> > refreshed a half hour after that time and not at the next half hour
> > mark. I can do some math to figure out the remaining time and use that
> > to set the cache timeout.
>
> > My big problem comes when paging right and left in time. The cache
> > manager does not recognize that a different request has been made and
> > it serves the current cached version. How do I get the cache manager
> > to see the difference?
>
> How many channels are you working with? My first thought is to cache
> the entire day's schedule and use javascript to display only a certain
> portion. Off the top of my head, I'm not quite sure how I'd do that
> but I'll bet there's a really elegant way to do that with, say,
> jquery. I'm thinking that you'd give the table colgroups [1] IDs based
> on the time (note that IDs cannot begin with a digit so prepend some
> string to each). Then have your JS parse out the hash portion of the
> URL to figure out from where to display from.
>
> So, your JS would, on page load, hide the entire table, then parse the
> location.hash value (if not exists, start from the beginning of the
> table), and then slide the table colgroups to the left (obviously, use
> CSS overflow to hide what is "off" the screen) until the desired time
> colgroup is at the left side. Then your paging links would simply call
> a JS function to slide the schedule left or right. No reloading the
> page.
>
> Does that make sense?
>
> BTW, with Cake, you can create a link with a hash value by using the
> '#' option in $html->link().
>
> [1]http://www.w3.org/TR/2010/WD-html-markup-20100624/colgroup.html

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 8:44 AM, RhythmicDevil  wrote:
> Hello,
> I have a view that shows a television schedule, similar to DirectTVs
> (http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a list of
> channels and programs in a 4 hour slice broken into 1/2 hour columns.
> When the schedule first loads the start time is is the most recent 1/2
> hour mark. Meaning that if its 7.03am the window will start at 7am. If
> the time is 7.47am the window will start at 7.30. You are able to page
> left and right in 1/2 hour chunks.
>
> I am trying to improve performance of the view, as you can imagine its
> a ton of data to compile and the HTML is fairly complex. My aim is
> cache the most current schedule chunk. So assume the time is currently
> 7.03am. The application gets it's first request for the schedule. The
> controller fetches the schedule from the model starting at 7.00am and
> then caches it. All subsequent requests for that particular start time
> (7am) for all users will use the cached version until 7.30am at which
> point the cache is cleared and process starts again.
>
> I have implemented Cake's view caching and set the cache action as
> follows:
>
> $this->cacheAction = array('getTvSchedule/' => 1800);
>
> This causes an obvious problem. If the first request for a schedule
> comes after a 1/2 hour mark (7am, 7.30am, 8am etc) the cache will
> refreshed a half hour after that time and not at the next half hour
> mark. I can do some math to figure out the remaining time and use that
> to set the cache timeout.
>
>
> My big problem comes when paging right and left in time. The cache
> manager does not recognize that a different request has been made and
> it serves the current cached version. How do I get the cache manager
> to see the difference?
>

How many channels are you working with? My first thought is to cache
the entire day's schedule and use javascript to display only a certain
portion. Off the top of my head, I'm not quite sure how I'd do that
but I'll bet there's a really elegant way to do that with, say,
jquery. I'm thinking that you'd give the table colgroups [1] IDs based
on the time (note that IDs cannot begin with a digit so prepend some
string to each). Then have your JS parse out the hash portion of the
URL to figure out from where to display from.

So, your JS would, on page load, hide the entire table, then parse the
location.hash value (if not exists, start from the beginning of the
table), and then slide the table colgroups to the left (obviously, use
CSS overflow to hide what is "off" the screen) until the desired time
colgroup is at the left side. Then your paging links would simply call
a JS function to slide the schedule left or right. No reloading the
page.

Does that make sense?

BTW, with Cake, you can create a link with a hash value by using the
'#' option in $html->link().

[1] http://www.w3.org/TR/2010/WD-html-markup-20100624/colgroup.html

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache / file.php / unserialize() error

2010-06-02 Thread Graham Weldon
This should be fixed in #769
http://cakephp.lighthouseapp.com/projects/42648/tickets/769

We're working towards packaging another release for this as soon as possible.

Cheers,
Graham Weldon (AKA: Predominant)

On Wed, Jun 2, 2010 at 5:38 AM, Brent  wrote:
> Hello,
>
> I installed CakePHP 1.3.1 and a CMS app named Croogo on my Solaris
> server.  Loading pages  produces errors like this one:
>
> 
> Notice (8): unserialize() [function.unserialize]: Error at offset 5 of
> 602 bytes [CORE/cake/libs/cache/file.php, line 176]
> Code | Context
>
> $key    =       "cake_core_file_map"
> $time   =       1275420867
> $cachetime      =       1275420872
> $data   =       
> "a:3:{s:4:\"Core\";a:3:{s:6:\"Router\";s:32:\"/www/croogo/cake/
> libs/router.php\";s:13:\"ClassRegistry\";s:40:\"/www/croogo/cake/libs/
> class_registry.php\";s:12:\"Overloadable\";s:38:\"/www/croogo/cake/
> libs/overloadable.php\";}s:10:\"Controller\";a:2:{s:9:\"Component\";s:
> 46:\"/www/croogo/cake/libs/controller/component.php\";s:10:\"Controller
> \";s:47:\"/www/croogo/cake/libs/controller/controller.php\";}s:4:\"View
> \";a:3:{s:6:\"Helper\";s:37:\"/www/croogo/cake/libs/view/helper.php
> \";s:4:\"View\";s:35:\"/www/croogo/cake/libs/view/view.php\";s:
> 5:\"Media\";s:36:\"/www/croogo/cake/libs/view/media.php\";}}
> "
>
> unserialize - [internal], line ??
> FileEngine::read() - CORE/cake/libs/cache/file.php, line 176
> Cache::read() - CORE/cake/libs/cache.php, line 347
> App::getInstance() - CORE/cake/libs/configure.php, line 967
> App::build() - CORE/cake/libs/configure.php, line 650
> Configure::__loadBootstrap() - CORE/cake/libs/configure.php, line 431
> Configure::getInstance() - CORE/cake/libs/configure.php, line 52
> include - CORE/cake/bootstrap.php, line 38
> [main] - APP/webroot/index.php, line 76
> 
>
> What can I do to fix it?
>
> Many thanks,
> Brent
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: cache key not working

2010-04-25 Thread Todd McGrath
Ok, and one more thing-

It works fine on my dev box -- OS X with MAMP.  The problem only
appears in public test server.  CentOS 5, Apache 2, PHP 5

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: cache key not working

2010-04-25 Thread Todd McGrath
More info-

It's 1.3 RC4 I believe.  Not stable congratulations by the way!

Adding to original description, because I'm not sure if it matters,
but the element call is in a for loop:

foreach ($section['AssessmentQuestion'] as $question) {
  echo $this->element('question', array("questionId" =>
$question['id'], "cache" => array('time'=> "+7 days",'key'=>'question'.
$question['id'])));
  // works echo $this->element('question', array("questionId" =>
$question['id']));
}



On Apr 25, 8:18 pm, Todd McGrath  wrote:
> Hi,
>
> See anything wrong with this:
> echo $this->element('question', array('questionId' => $question['id'],
> 'cache' => array('time'=> '+2 hours','key'=>$question['id'].'--
> question_id')));
>
> I'm getting the same result each time, but I know the $[question['id']
> is different.
>
> In other words, it's like the cache key is not being used.
>
> Using Cake 1.3 RC 4.
>
> If I put all the cache settings in this element call, everything works
> as expected.  But, I have a couple of requestAction in the element, so
> I'm hoping to get this working.  I've had it working fine in Cake 1.2
>
> Thoughts?  Ideas?
>
> Todd
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: cache is messing up cookies and session???

2010-03-20 Thread leafchild book
I have checked this page:
http://book.cakephp.org/view/213/Cache

try to control cache but it seems
not working?

even I set

something,,, something


browser is keep using cache view so it is not updating current file view.


How can I stop cake to use cache view and shows current one?

Please someone give me some idea

Thanks





On Sat, Mar 20, 2010 at 3:55 AM, leafchild book wrote:

> this is reproducible by everybody
>
> i have to refresh page to get right cookie information.
>
> how can I get right cookie information without refreshing?
>
>
>
>
> On Sat, Mar 20, 2010 at 12:57 AM, John Andersen 
> wrote:
>
>> I would think that this is an issue with the browser cache!
>> Enjoy,
>>   John
>>
>> On Mar 20, 1:05 am, leafchild book  wrote:
>> > I said cache is messing up but not 100% sure but it's obvious that
>> > cookie's info is not update unless page is refreshed
>> >
>> > How can I get right cookie info without refreshing page after user
>> update
>> > shopping cart or their billing info.
>> >
>> [snip]
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>> To unsubscribe from this group, send email to cake-php+
>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>> ME" as the subject.
>>
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: cache is messing up cookies and session???

2010-03-20 Thread leafchild book
this is reproducible by everybody

i have to refresh page to get right cookie information.

how can I get right cookie information without refreshing?



On Sat, Mar 20, 2010 at 12:57 AM, John Andersen wrote:

> I would think that this is an issue with the browser cache!
> Enjoy,
>   John
>
> On Mar 20, 1:05 am, leafchild book  wrote:
> > I said cache is messing up but not 100% sure but it's obvious that
> > cookie's info is not update unless page is refreshed
> >
> > How can I get right cookie info without refreshing page after user update
> > shopping cart or their billing info.
> >
> [snip]
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: cache is messing up cookies and session???

2010-03-20 Thread John Andersen
I would think that this is an issue with the browser cache!
Enjoy,
   John

On Mar 20, 1:05 am, leafchild book  wrote:
> I said cache is messing up but not 100% sure but it's obvious that
> cookie's info is not update unless page is refreshed
>
> How can I get right cookie info without refreshing page after user update
> shopping cart or their billing info.
>
[snip]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: cache is messing up cookies and session???

2010-03-19 Thread leafchild book
I said cache is messing up but not 100% sure but it's obvious that
cookie's info is not update unless page is refreshed

How can I get right cookie info without refreshing page after user update
shopping cart or their billing info.





On Fri, Mar 19, 2010 at 12:52 PM, leafchild wrote:

> I think CakePhp's cookies is messed up by automatic cakephp chache.
>
> my shopping cart, order are starts showing previous one and I have to
> refresh the page to see new order or shopping cart information.
>
> [issue a]
> in shopping cart page, changing # of item or removing item in shopping
> cart is like not working but if you refresh the page then you see it's
> working.
>
> [issue b]
> at Thank you page after completed processing order, I see that order #
> is previous one then no order data is inserted to DB(no confirmation
> email either)
> then when I refresh page then I see different order # displayed and
> new order inserted to DB and also confirmation email is send.
>
>
> Once all process is done, I deleted the cookie but why this is
> happening??
>
>
>
> Till yesterday the accessing every page was extremely slow(even the
> page is not accessing DB at all), then I found that sub directory of
> "app/tmp/cache/"
> dir's permission was 755 so I changed to 777 after that showing page
> much faster. This changing permission cosing this issue?
>
>
> Please someone advice!
>
> Thanks
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Cache help

2010-02-15 Thread John Andersen
Ok, based on your code example, the list of offending words are in
your variable $restrictions, which is the same as a list from the
model. So you should be able to use something like:
[code]
if ( in_array($restrictions, 'my bad word') ) {
   // do something with bad word
}
[/code]

This could all be done by a model method, which ensures that the
latest restrictions are read from either the cache or the database,
then checks the word and returns whatever result you want.
Enjoy,
   John

On Feb 14, 9:51 pm, "Dave"  wrote:
> Right I know how to read cache if nothing then do the find and cache the
> data results. But in this case I want to search the cached data rather than
> look for a value in the db directly.
>
> Restrictions is a list of bad words. So I have my full list in the cache
> since it rarely changes. So if a user signs up with name "shitface" rather
> than search the entire db of words I figured it would be esier to see if its
> in the cached data. That’s where im stuck. Instead of find(model) im
> searching thru the cached data for name => shitface.
>
> Thanks,
>
> Dave
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
>
> Of John Andersen
> Sent: February-14-10 4:06 PM
> To: CakePHP
> Subject: Re: Cache help
>
> Use the code construction as defined in the CakePHP book 
> at:http://book.cakephp.org/view/767/Cache-write
> where the code first ask for the data from the cache and upon a false
> result, requests the data from the model, and fills the cache with the
> models result.
> Hope this helps you on the way,
>    John
>
> On Feb 13, 10:01 pm, "Dave"  wrote:
> > I want to add this in my User model for registrations checking for
> > banned words type thing.
>
> >   $params = array(
> >    'contain' => false,
> >    'fields' => array(
> >     'Restriction.id',
> >     'Restriction.name'));
>
> >   $restrictions = Cache::read('restrictions_cache', 'long');
>
> >   if (empty($restrictions))
> >   {
> >    Controller::loadModel('Restriction');
> >    $restrictions = $this->Restriction->find('list' , $params);
> >    Cache::write('restrictions_cache', $restrictions,'long');
> >   }
>
> > But how do I search the cache for data?
>
> > Right now I  have this to check the table but since the data in
> > Restrictions never changes I just want to cache the data and do my
> > find with the cached data.
>
> > $q = $this->Restriction->find('first' , array('conditions' => array(
> > 'Restriction.name LIKE' => $value)));
>
> > Thanks
>
> > Dave
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com To
> unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> cake-php+athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


RE: Cache help

2010-02-14 Thread Dave
Right I know how to read cache if nothing then do the find and cache the
data results. But in this case I want to search the cached data rather than
look for a value in the db directly.

Restrictions is a list of bad words. So I have my full list in the cache
since it rarely changes. So if a user signs up with name "shitface" rather
than search the entire db of words I figured it would be esier to see if its
in the cached data. That’s where im stuck. Instead of find(model) im
searching thru the cached data for name => shitface.

Thanks,

Dave

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of John Andersen
Sent: February-14-10 4:06 PM
To: CakePHP
Subject: Re: Cache help

Use the code construction as defined in the CakePHP book at:
http://book.cakephp.org/view/767/Cache-write
where the code first ask for the data from the cache and upon a false
result, requests the data from the model, and fills the cache with the
models result.
Hope this helps you on the way,
   John

On Feb 13, 10:01 pm, "Dave"  wrote:
> I want to add this in my User model for registrations checking for 
> banned words type thing.
>
>   $params = array(
>    'contain' => false,
>    'fields' => array(
>     'Restriction.id',
>     'Restriction.name'));
>
>   $restrictions = Cache::read('restrictions_cache', 'long');
>
>   if (empty($restrictions))
>   {
>    Controller::loadModel('Restriction');
>    $restrictions = $this->Restriction->find('list' , $params);
>    Cache::write('restrictions_cache', $restrictions,'long');
>   }
>
> But how do I search the cache for data?
>
> Right now I  have this to check the table but since the data in 
> Restrictions never changes I just want to cache the data and do my 
> find with the cached data.
>
> $q = $this->Restriction->find('first' , array('conditions' => array( 
> 'Restriction.name LIKE' => $value)));
>
> Thanks
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

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

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache help

2010-02-14 Thread John Andersen
Use the code construction as defined in the CakePHP book at:
http://book.cakephp.org/view/767/Cache-write
where the code first ask for the data from the cache and upon a false
result, requests the data from the model, and fills the cache with the
models result.
Hope this helps you on the way,
   John

On Feb 13, 10:01 pm, "Dave"  wrote:
> I want to add this in my User model for registrations checking for banned
> words type thing.
>
>   $params = array(
>    'contain' => false,
>    'fields' => array(
>     'Restriction.id',
>     'Restriction.name'));
>
>   $restrictions = Cache::read('restrictions_cache', 'long');
>
>   if (empty($restrictions))
>   {
>    Controller::loadModel('Restriction');
>    $restrictions = $this->Restriction->find('list' , $params);
>    Cache::write('restrictions_cache', $restrictions,'long');
>   }
>
> But how do I search the cache for data?
>
> Right now I  have this to check the table but since the data in Restrictions
> never changes I just want to cache the data and do my find with the cached
> data.
>
> $q = $this->Restriction->find('first' , array('conditions' => array(
> 'Restriction.name LIKE' => $value)));
>
> Thanks
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache User queries?

2010-02-10 Thread John Andersen
Using the Cache (CakePHP book at http://book.cakephp.org/view/764/Cache)
you can cache anything!
When using the Cache::read/write functions, just identify the cached
data as a key together with the users identification. Example:
Cache::write('user_no_'.$this->Auth->user('id').'_favorites',
$favorites, 'daily');

The above will save the favorites in the "user_no_xxx_favorites" cache
file and keep for 24 hours (cache configuration daily).

But read the chapters, understand how it works, and hopefully you will
get the idea.
Enjoy,
   John

On Feb 11, 3:03 am, "Dave"  wrote:
> Weird question.
>
> My user logs in and thru the site the page displays "favourite" icon if the
> user has bookmarked that page. My question is can you cache individual user
> data? When they login get all their bookmarked pages and cache that data
> then when they go thru the site grab the saved data in the cache rather than
> a query for every page?
>
> Thanks
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache MADNESS with Auth

2009-12-28 Thread lacenaepro...@gmail.com
HI CHAD,

YOU ARE THE GOD!!

So simple

Thank you very much, yuor code excerpt is interesting!!

Dario

On 28 Dic, 14:37, Chad Smith  wrote:
> Hello Dario,
>
> If the field is a tinyint (which most likely it is) then in Cake's
> mind 1 = true, 0 = false.  You changing it to 2 will confuse Cake and
> make it not know what to think.  You will need to change that field to
> int and then change the values to 2 if they are confirmed.
>
> When I was developinghttp://www.countycriminal.comhere's what I am
> using for the authentication of users:
>
> app/app_controller.php
> function beforeRender() {
>                 if(isset($this->params['admin']) && $this->params['admin'] ==
> 'admin'){
>                         
> if(!$this->checkUser($this->Session->read('admin_user'))){
>                                 $this->redirect('/administrators/login/');
>                         }else{
>                                 $this->layout = 'admin';
>                                 $this->set('IS_ADMIN',true);
>                         }
>                 }
>         }
>
>         function checkUser($user) {
>                 if((!is_array($user)) || 
> (!isset($user['Administrator']['id']))){
>                         return false;
>                 } else {
>                         return true;
>                 }
>         }
>
> app/controllers/administrators_controller.php
> function login() {
>                 $this->layout = "admin";
>
>                 if(!empty($this->data)) {
>                         $user_login = $this->Administrator->find('first', 
> array
> ('conditions' => array('username' => $this->data['administrators']
> ['username'], 'password' => $this->data['administrators']
> ['password'])));
>                         if(!empty($user_login)){
>                                 // Writes the session for the admin
>                                 $this->Session->write('admin_user', 
> $user_login);
>                                 $last = 
> $user_login['Administrator']['lastlogin'];
>                                 $user_login['Administrator']['lastlogin'] = 
> date('Y-m-d H:i:s');
>                                 $this->Administrator->save($user_login);
>                                 $this->Session->setFlash(__('You have been 
> login successfully.
> Last Login: '.date('l, F jS Y \a\t g:ia',strtotime($last)), true),
> 'default', array('class'=>'success'));
>                                 $this->redirect('/admin/');
>                         } else {
>                                 $this->Session->setFlash(__('The login was 
> invalid, please try
> again.', true), 'default', array('class'=>'error'));
>                         }
>                 }
>         }
>
> As you can see the before render will check to see if it's an "admin"
> area and if so it checks to make sure the user is logged in.  If they
> are not it will send them to the administrators/login page which will
> then check their login.  If it's successful it will set the session
> and continue on.  If however, it's not successful it will send them
> back with a message that it failed to log them in.
>
> Take care hope this points you in the right direction,
> Chad
>
> On Dec 28, 8:10 am, "lacenaepro...@gmail.com"
>
>
>
>  wrote:
> > Hi,
>
> > I have this userscope Auth configuration in the AppController:
>
> > $this->Auth->userScope = array('User.confirmed' => '1');
>
> > Today I decided to change the value from 1 to 2. I changed the line
> > above and ALL THE RECORDS IN THE user table.
>
> > The Auth components now DOES NOT LOGIN the users. I cleared the cache
> > but nothing happens!!
>
> > I hate this cakephp behaviour. Every time I work with the Auth/Acl,
> > some sort of caching mechanism is causing problems.
>
> > Do you have any idea?
>
> > Thanks!!
>
> > Dario- Nascondi testo citato
>
> - Mostra testo citato -

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache MADNESS with Auth

2009-12-28 Thread Chad Smith
Hello Dario,

If the field is a tinyint (which most likely it is) then in Cake's
mind 1 = true, 0 = false.  You changing it to 2 will confuse Cake and
make it not know what to think.  You will need to change that field to
int and then change the values to 2 if they are confirmed.

When I was developing http://www.countycriminal.com here's what I am
using for the authentication of users:

app/app_controller.php
function beforeRender() {
if(isset($this->params['admin']) && $this->params['admin'] ==
'admin'){

if(!$this->checkUser($this->Session->read('admin_user'))){
$this->redirect('/administrators/login/');
}else{
$this->layout = 'admin';
$this->set('IS_ADMIN',true);
}
}
}

function checkUser($user) {
if((!is_array($user)) || 
(!isset($user['Administrator']['id']))){
return false;
} else {
return true;
}
}

app/controllers/administrators_controller.php
function login() {
$this->layout = "admin";

if(!empty($this->data)) {
$user_login = $this->Administrator->find('first', array
('conditions' => array('username' => $this->data['administrators']
['username'], 'password' => $this->data['administrators']
['password'])));
if(!empty($user_login)){
// Writes the session for the admin
$this->Session->write('admin_user', 
$user_login);
$last = 
$user_login['Administrator']['lastlogin'];
$user_login['Administrator']['lastlogin'] = 
date('Y-m-d H:i:s');
$this->Administrator->save($user_login);
$this->Session->setFlash(__('You have been 
login successfully.
Last Login: '.date('l, F jS Y \a\t g:ia',strtotime($last)), true),
'default', array('class'=>'success'));
$this->redirect('/admin/');
} else {
$this->Session->setFlash(__('The login was 
invalid, please try
again.', true), 'default', array('class'=>'error'));
}
}
}

As you can see the before render will check to see if it's an "admin"
area and if so it checks to make sure the user is logged in.  If they
are not it will send them to the administrators/login page which will
then check their login.  If it's successful it will set the session
and continue on.  If however, it's not successful it will send them
back with a message that it failed to log them in.

Take care hope this points you in the right direction,
Chad

On Dec 28, 8:10 am, "lacenaepro...@gmail.com"
 wrote:
> Hi,
>
> I have this userscope Auth configuration in the AppController:
>
> $this->Auth->userScope = array('User.confirmed' => '1');
>
> Today I decided to change the value from 1 to 2. I changed the line
> above and ALL THE RECORDS IN THE user table.
>
> The Auth components now DOES NOT LOGIN the users. I cleared the cache
> but nothing happens!!
>
> I hate this cakephp behaviour. Every time I work with the Auth/Acl,
> some sort of caching mechanism is causing problems.
>
> Do you have any idea?
>
> Thanks!!
>
> Dario

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache Race conditions, any solution available ?

2009-12-22 Thread Dave J
I think you pretty much got it right there. The simplest way would be
to set the timeout like you said, in the far future, and then have a
cron job in the background calling the Cake console (or special URL),
which does the real request and sets the cache value.

That would effectively reduce the database requests to only the
necessary ones every N minutes. So you would be in 'control' of
populating the cache, and not the visitors

On Dec 21, 9:38 pm, Adrenalin  wrote:
> Here is the problem
> "Say you cache the latest five comments for display on a sidebar in
> your application. You decide that the data only needs to be refreshed
> once per minute. However, you neglect to remember that this sidebar
> display is renderred 50 times per second! Thus, once 60 seconds rolls
> around and the cache expires, suddenly 10+ processes are running the
> same SQL query to repopulate that cache. Every time the cache expires,
> a sudden burst of SQL traffic will result. " 
> (sourcehttp://code.google.com/p/memcached/wiki/FAQ)
>
> Any solution already made ? I was a bit disappointed cakephp didn't
> offered a solution "by default".. Or I was unable to find it's already
> there.
>
> Here's one proposed by the same FAQ
>
> "First, set the cache item expire time way out in the future. Then,
> you embed the "real" timeout serialized with the value. For example
> you would set the item to timeout in 24 hours, but the embedded
> timeout might be five minutes in the future.
>
> Then, when you get from the cache and examine the timeout and find it
> expired, immediately edit the embedded timeout to a time in the future
> and re-store the data as is. Finally, fetch from the DB and update the
> cache with the latest value. This does not eliminate, but drastically
> reduces the amount of time where a stampede can occur. "
>
> If I would like to implement that in the existing Cache::write, what
> would be the right thing to do ?
>
> Thank you.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache Race conditions, any solution available ?

2009-12-22 Thread AD7six


On 21 dic, 22:38, Adrenalin  wrote:
> Here is the problem
> "Say you cache the latest five comments for display on a sidebar in
> your application. You decide that the data only needs to be refreshed
> once per minute. However, you neglect to remember that this sidebar
> display is renderred 50 times per second! Thus, once 60 seconds rolls
> around and the cache expires, suddenly 10+ processes are running the
> same SQL query to repopulate that cache. Every time the cache expires,
> a sudden burst of SQL traffic will result. " 
> (sourcehttp://code.google.com/p/memcached/wiki/FAQ)
>
> Any solution already made ? I was a bit disappointed cakephp didn't
> offered a solution "by default".. Or I was unable to find it's already
> there.
>
> Here's one proposed by the same FAQ
>
> "First, set the cache item expire time way out in the future. Then,
> you embed the "real" timeout serialized with the value. For example
> you would set the item to timeout in 24 hours, but the embedded
> timeout might be five minutes in the future.
>
> Then, when you get from the cache and examine the timeout and find it
> expired, immediately edit the embedded timeout to a time in the future
> and re-store the data as is. Finally, fetch from the DB and update the
> cache with the latest value. This does not eliminate, but drastically
> reduces the amount of time where a stampede can occur. "
>
> If I would like to implement that in the existing Cache::write, what
> would be the right thing to do ?

Funnily enough I was looking at this yesterday. If you implement a
cache wrapper of some kind (e.g. http://bin.cakephp.org/view/129354301
see 
http://code.assembla.com/mi/subversion/nodes/branches/mi_plugin/vendors/mi_cache.php)
Then you could modify your read method to permit restoring and
returning stale data and registering (gearman? afterFilter/destruct
trigger?) a call to regenerate the stale key.

That was the conclusion I reached yesterday, I'd be interested in
other options/opinions.

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: cache prefix

2009-12-20 Thread Kawina
It seems that the prefix setting is virtually ignored. I've waded
through the code and found too many instances of "cake_" being hard
coded to want to try to modify it.

I found what seems like a more promising approach that has only worked
partially. My goal is to allow for caches for multiple instances of
the app using the server tmp directory. The approach that partially
worked is changing the path of the cache as follows in cake/config/
paths.php.

Original:
define('CACHE', TMP.'cache'.DS);
Modified:
define('CACHE', TMP.'cache_alt1'.DS);

The problem is that it only works once. Using alt2 in another instance
has no effect and that instance of the application ends up functioning
without a cache. Does anyone have any idea why?

On Dec 18, 8:05 am, Kawina  wrote:
> Any help? Thanks.
>
> On Dec 17, 9:12 am, Kawina  wrote:
>
> > I'm new to CakePHP and my little knowledge is derived from  minor
> > modifications to an app created by someone else. Accordingly, my
> > familiarity with thecachesystem is limited.
>
> > My search of this group on the issue only yielded old bugs that I hope
> > have been subsequently fixed.
>
> > I tried adding a prefix in /app/config/core.php. I changed it in
> > accordance with the documentation as follows:
> > Original:Cache::config('default', array('engine' => 'File', 'path' =>
> >CACHE) );
> > Change:Cache::config('default', array('engine' => 'File', 'path' =>
> >CACHE, 'prefix' => 'uat_') );
>
> > However, that has had no effect. A typicalcachefile looks like this:
> > cake_core_default_eng (in /persistent).
>
> > I'm surprised by the "cake_" prefix. Is that the default when no
> > prefix is defined?
>
> > Are there other files to modify? Is it possible that the configuration
> > is in acachefile that should be deleted, and if so which one?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: cache prefix

2009-12-18 Thread Kawina
Any help? Thanks.

On Dec 17, 9:12 am, Kawina  wrote:
> I'm new to CakePHP and my little knowledge is derived from  minor
> modifications to an app created by someone else. Accordingly, my
> familiarity with the cache system is limited.
>
> My search of this group on the issue only yielded old bugs that I hope
> have been subsequently fixed.
>
> I tried adding a prefix in /app/config/core.php. I changed it in
> accordance with the documentation as follows:
> Original: Cache::config('default', array('engine' => 'File', 'path' =>
> CACHE) );
> Change: Cache::config('default', array('engine' => 'File', 'path' =>
> CACHE, 'prefix' => 'uat_') );
>
> However, that has had no effect. A typical cache file looks like this:
> cake_core_default_eng (in /persistent).
>
> I'm surprised by the "cake_" prefix. Is that the default when no
> prefix is defined?
>
> Are there other files to modify? Is it possible that the configuration
> is in a cache file that should be deleted, and if so which one?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache Help

2009-12-15 Thread Piotr Kilczuk
Hello,

> How do i make sure that the browser does not cache elements, pages. I have
> the cache no cache blocks in view, cache helper in app_controller, var
> cacheAction = false. tried everything but nothing seems to work.

How about http://api.cakephp.org/class/controller#method-ControllerdisableCache
?

Regards,
Piotr

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Cache grinding, debugging, optimising a CakePHP app?

2009-11-19 Thread majna
What is your xdebug setup in php.ini?
xdebug.auto_trace=1
xdebug.auto_profile=1
xdebug.auto_profile_mode=0
xdebug.profiler_output_dir="C:\"
xdebug.profiler_output_name="timestamp"
xdebug.profiler_enable=on

check this out first

On Nov 19, 2:09 pm, Adrian  wrote:
> Hi
>
> I am trying to pin point where my CakePHP application is spending my
> valueble CPU time so I can decide what code to focus optimisations on.
>
> Could anyone tell me what setup they use for this kind of debugging/
> cache grinding? Or point me in the direction of a guide or something?
>
> I have tried setting up xdebug on my Windows XAMPP installation. This
> appears to be running and I have looked at the output data in these
> apps:
>
> Webgrind -http://code.google.com/p/webgrind/
> WinCacheGrind -http://sourceforge.net/projects/wincachegrind/
>
> This appears to be working (files are created when I access pages on
> my app and I can open them in one of the tools above) but I don't
> understand the data, I cannot see any references to my apps objects/
> methods and everything says it took 0 seconds to complete.
>
> If anyone could help me, it would be very much appreciated :)

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.




Re: Cache View dose not work

2009-11-04 Thread nurvzy

APP\views\elements\slide.ctp, line 9

What's on line 9 of slide.ctp?

Follow the backtrace and start commenting out things until you get it
narrowed down what is breaking your cache.

On Nov 3, 6:42 am, hansi meier  wrote:
> same problem!
> cakephp cache form.. (userlogin)
> how can i use cache with a cakeform?
>
> On 9 Okt., 15:18, Simon  wrote:
>
> > yes i did that too
>
> > On Oct 9, 2:56 am, Marco  wrote:
>
> > > Did you set Configure::Cache.check to true in core.php?
>
> > > Marco
>
> > > On Oct 8, 1:45 pm, Simon  wrote:
>
> > > > i tired both
> > > > element('logininfo', array('cache' => false)); ?>
> > > > => this dosen't work at all
>
> > > > in the element i tired  which i see no
> > > > debug error even though i set the debug 2
> > > > but when i see the view source page i get the errorr that i posted
> > > > above
> > > > thats wired problem that i cant figure out
> > > > thank you
>
> > > > On Oct 8, 9:29 am, Miles J  wrote:
>
> > > > > Try playing the nocache tags in the element itself. You can also pass
> > > > > an option to the element ofcache= false.
>
> > > > > element('logininfo', array('cache' => false)); ?>
>
> > > > > On Oct 8, 9:26 am, Simon  wrote:
>
> > > > > > haven't tried to remove thecachehelper would  that make any
> > > > > > difference ?
>
> > > > > > sorry i just wrote the  twice in this post  but the 
> > > > > > code
> > > > > > is like this see below in my layout
>
> > > > > > 
> > > > > > element('logininfo'); ?>
> > > > > > 
>
> > > > > > On Oct 8, 9:17 am, Miles J  wrote:
>
> > > > > > > Do you get an error when we remove thecachehelper?
>
> > > > > > > Also the code should be:
>
> > > > > > > 
> > > > > > > element('logininfo'); ?>
> > > > > > > 
>
> > > > > > > On Oct 8, 7:44 am, Simon  wrote:
>
> > > > > > > > well in that element it has the login user info which you dont 
> > > > > > > > wanna
> > > > > > > >cache
> > > > > > > > here is what i have in post controller
>
> > > > > > > >  var $helpers = array('Cache');
>
> > > > > > > > in my view  action i have this
>
> > > > > > > > $this->cacheAction = '1 hour';
>
> > > > > > > > then in my default layout i have this element which i put the
> > > > > > > > 
> > > > > > > > 
> > > > > > > > element('logininfo'); ?>
> > > > > > > > 
> > > > > > > > then i get errorr which i can't see in the browser i did view 
> > > > > > > > source
>
> > > > > > > > this is the ouput of error
>
> > > > > > > > 
> > > > > > > > Notice > > > > > > > b> (8): Undefined property: stdClass::$model 
> > > > > > > > [CORE\cake\libs
> > > > > > > > \view\helper.php, line 333]
> > > > > > > > 
> > > > > > > >  > > > > > > > style="display:
> > > > > > > > none;"> > > > > > > > onclick='document.getElementById
> > > > > > > > ("CakeErrorCode1").style.display = (document.getElementById
> > > > > > > > ("CakeErrorCode1").style.display == "none" ? "" : 
> > > > > > > > "none")'>Code |
> > > > > > > > Context > > > > > > > a> > > > > > > > style="display:
> > > > > > > > none;">$entity  =       "User."
> > > > > > > > $setScope       =       true
> > > > > > > > $view   =       stdClass
> > > > > > > > stdClass::$modelScope = false > > > > > > > class="cake-code-dump" style="display: none;"> > > > > > > > style="color:
> > > > > > > > #00">} > > > > > > > code>
> > > > > > > > 
> > > > > > > > 
> > > > > > > > $model = $view->model;
> > > > > > > > Helper::setEntity() - 
> > > > > > > > CORE\cake\libs\view\helper.php,
> > > > > > > > line 333
> > > > > > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, 
> > > > > > > > line 122
> > > > > > > > include - APP\views\elements\slide.ctp, line 9
> > > > > > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > > > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > > > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, 
> > > > > > > > line
> > > > > > > > 121
> > > > > > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > > > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > > > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > > > > > [main] - APP\webroot\index.php, line 90
> > > > > > > > 
> > > > > > > > Notice > > > > > > > b> (8): Undefined property: stdClass::$association 
> > > > > > > > [CORE\cake
> > > > > > > > \libs\view\helper.php, line 366]
> > > > > > > > 
> > > > > > > >  > > > > > > > style="display:
> > > > > > > > none;"> > > > > > > > onclick='document.getElementById
> > > > > > > > ("CakeErrorCode2").style.display = (document.getElementById
> > > > > > > > ("CakeErrorCode2").style.display == "none" ? "" : 
> > > > > > > > "none")'>Code |
> > > > > > > > Context > > > > > > > a> > > > > > > > style="display:
> > > > > > > > none;">$entity  =       "User."
> > > > > > > > $setScope       =       true
> > > > > > > > $view   =       stdClass
> > > > > > > > stdClass::$modelScope = false
> > > > > > > > $model  =       null

Re: Cache View dose not work

2009-11-03 Thread hansi meier

same problem!
cakephp cache form.. (userlogin)
how can i use cache with a cakeform?



On 9 Okt., 15:18, Simon  wrote:
> yes i did that too
>
> On Oct 9, 2:56 am, Marco  wrote:
>
> > Did you set Configure::Cache.check to true in core.php?
>
> > Marco
>
> > On Oct 8, 1:45 pm, Simon  wrote:
>
> > > i tired both
> > > element('logininfo', array('cache' => false)); ?>
> > > => this dosen't work at all
>
> > > in the element i tired  which i see no
> > > debug error even though i set the debug 2
> > > but when i see the view source page i get the errorr that i posted
> > > above
> > > thats wired problem that i cant figure out
> > > thank you
>
> > > On Oct 8, 9:29 am, Miles J  wrote:
>
> > > > Try playing the nocache tags in the element itself. You can also pass
> > > > an option to the element ofcache= false.
>
> > > > element('logininfo', array('cache' => false)); ?>
>
> > > > On Oct 8, 9:26 am, Simon  wrote:
>
> > > > > haven't tried to remove thecachehelper would  that make any
> > > > > difference ?
>
> > > > > sorry i just wrote the  twice in this post  but the code
> > > > > is like this see below in my layout
>
> > > > > 
> > > > > element('logininfo'); ?>
> > > > > 
>
> > > > > On Oct 8, 9:17 am, Miles J  wrote:
>
> > > > > > Do you get an error when we remove thecachehelper?
>
> > > > > > Also the code should be:
>
> > > > > > 
> > > > > > element('logininfo'); ?>
> > > > > > 
>
> > > > > > On Oct 8, 7:44 am, Simon  wrote:
>
> > > > > > > well in that element it has the login user info which you dont 
> > > > > > > wanna
> > > > > > >cache
> > > > > > > here is what i have in post controller
>
> > > > > > >  var $helpers = array('Cache');
>
> > > > > > > in my view  action i have this
>
> > > > > > > $this->cacheAction = '1 hour';
>
> > > > > > > then in my default layout i have this element which i put the
> > > > > > > 
> > > > > > > 
> > > > > > > element('logininfo'); ?>
> > > > > > > 
> > > > > > > then i get errorr which i can't see in the browser i did view 
> > > > > > > source
>
> > > > > > > this is the ouput of error
>
> > > > > > > 
> > > > > > > Notice > > > > > > b> (8): Undefined property: stdClass::$model 
> > > > > > > [CORE\cake\libs
> > > > > > > \view\helper.php, line 333]
> > > > > > > 
> > > > > > >  > > > > > > onclick='document.getElementById
> > > > > > > ("CakeErrorCode1").style.display = (document.getElementById
> > > > > > > ("CakeErrorCode1").style.display == "none" ? "" : 
> > > > > > > "none")'>Code |
> > > > > > > Context > > > > > > a>$entity  =       "User."
> > > > > > > $setScope       =       true
> > > > > > > $view   =       stdClass
> > > > > > > stdClass::$modelScope = false > > > > > > class="cake-code-dump" style="display: none;"> > > > > > > style="color:
> > > > > > > #00">} > > > > > > code>
> > > > > > > 
> > > > > > > 
> > > > > > > $model = $view->model;
> > > > > > > Helper::setEntity() - 
> > > > > > > CORE\cake\libs\view\helper.php,
> > > > > > > line 333
> > > > > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 
> > > > > > > 122
> > > > > > > include - APP\views\elements\slide.ctp, line 9
> > > > > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, 
> > > > > > > line
> > > > > > > 121
> > > > > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > > > > [main] - APP\webroot\index.php, line 90
> > > > > > > 
> > > > > > > Notice > > > > > > b> (8): Undefined property: stdClass::$association 
> > > > > > > [CORE\cake
> > > > > > > \libs\view\helper.php, line 366]
> > > > > > > 
> > > > > > >  > > > > > > onclick='document.getElementById
> > > > > > > ("CakeErrorCode2").style.display = (document.getElementById
> > > > > > > ("CakeErrorCode2").style.display == "none" ? "" : 
> > > > > > > "none")'>Code |
> > > > > > > Context > > > > > > a>$entity  =       "User."
> > > > > > > $setScope       =       true
> > > > > > > $view   =       stdClass
> > > > > > > stdClass::$modelScope = false
> > > > > > > $model  =       null
> > > > > > > $hasField       =       false
> > > > > > > $sameScope      =       true
> > > > > > > $parts  =       array(
> > > > > > >         "User"
> > > > > > > ) > > > > > > style="display:
> > > > > > > none;">} > > > > > > code>
> > > > > > > 
> > > > > > > if (!
> > > > > > > $view->association && $parts[0] == 
> > > > > > > $view->field && $view->field != 
> > > > > > > $view->model) {
> > > > > > > Helper::setEntity() - 
> > > > > > > CORE\cake\libs\view\helper.php,
> > > > > > > line 366
> > > > > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 
> > > > > > > 122
> > > > > > > include - APP\views\elements\slide.ctp, line 9

RE: Cache Help

2009-11-02 Thread Dave

Maybe I should have put in baby steps for you to follow.
1. Click edit
2.Save
3. Save redirects you back to index.
4.Look no new content
5.Click new or edit
6.Save
7.Back to index
8.No new content , add or edit new content and nothing shows up until you
hit refresh...(the index is cached)i know on other sites on the web when you
save or edit your content you don’t have to refresh the page to see your
updatesmaybe the sites I go to are different than the ones you do but im
sure if you thought about it you might see what I mean?
9.Hit refresh
10.WOW LOOK new content

Yes $this->cacheAction = false;

If you don’t have ananswer your can keep your snarky additude response's to
your self "You have to hit refresh to reload a webpage... like everyone
else?" Yes because that exactly what I was asking!

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Robert P
Sent: November-02-09 11:30 PM
To: CakePHP
Subject: Re: Cache Help


OK, this one confused me. You have to hit refresh to reload a webpage...
like everyone else?

And I've never seen $this->disableCache() before. Since 1.1 I've been using
$this->cacheAction = false;

On Nov 3, 8:48 am, "Dave"  wrote:
> I need some help figuring out caching. A lot of the site I am working 
> on is dynamic and I do not want to cache the constantly changing data /
actions.
>
> I have added Cache to app_controller, even to individual controllers,
>
> added nocache blocks in the views, $this->disableCache(); in 
> controllers
>
> but everytime i make a change i have to hit refresh to get the new 
> data. not just on one page but every page
>
> Any tips, suggestion?
>
> Dave


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



Re: Cache Help

2009-11-02 Thread Robert P

OK, this one confused me. You have to hit refresh to reload a
webpage... like everyone else?

And I've never seen $this->disableCache() before. Since 1.1 I've been
using $this->cacheAction = false;

On Nov 3, 8:48 am, "Dave"  wrote:
> I need some help figuring out caching. A lot of the site I am working on is
> dynamic and I do not want to cache the constantly changing data / actions.
>
> I have added Cache to app_controller, even to individual controllers,
>
> added nocache blocks in the views, $this->disableCache(); in controllers
>
> but everytime i make a change i have to hit refresh to get the new data. not
> just on one page but every page
>
> Any tips, suggestion?
>
> Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache question

2009-10-11 Thread Dr. Loboto

Call $this->disableCache(); for sensitive actions. Or call it always
when logged in.

On Oct 11, 11:33 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> I have an element that when the user logs in says Welcome Test Account One
> (being my dummy user's name)
>
> I logout and login as a different user and it shows Welcome Test Account One
> until i hit refresh then it shows Test Account Two
>
> I have wrapped the element in a  block.
>
> Logout destroy session but same thing. It always shows the last logged in
> user info until i hit refresh.
>
> Same thing happens on the site where i delete a post, after succesful delete
> i redirect back to the page where i was deleting the post and its still
> there until i refresh. And it to is wrapped in a no cache block.
>
> Any ideas why? How to avoid this?
>
> Thanks,
>
> Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Cache question

2009-10-11 Thread Dave Maharaj :: WidePixels.com

Firefox believe it or not. 

-Original Message-
From: euromark (munich) [mailto:dereurom...@googlemail.com] 
Sent: October-11-09 2:15 PM
To: CakePHP
Subject: Re: Cache question


did you experience that in the almighty crap-explorer IE?


On 11 Okt., 18:33, "Dave Maharaj :: WidePixels.com"
 wrote:
> I have an element that when the user logs in says Welcome Test Account 
> One (being my dummy user's name)
>
> I logout and login as a different user and it shows Welcome Test 
> Account One until i hit refresh then it shows Test Account Two
>
> I have wrapped the element in a  block.
>
> Logout destroy session but same thing. It always shows the last logged 
> in user info until i hit refresh.
>
> Same thing happens on the site where i delete a post, after succesful 
> delete i redirect back to the page where i was deleting the post and 
> its still there until i refresh. And it to is wrapped in a no cache block.
>
> Any ideas why? How to avoid this?
>
> Thanks,
>
> Dave



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



Re: Cache question

2009-10-11 Thread euromark (munich)

did you experience that in the almighty crap-explorer IE?


On 11 Okt., 18:33, "Dave Maharaj :: WidePixels.com"
 wrote:
> I have an element that when the user logs in says Welcome Test Account One
> (being my dummy user's name)
>
> I logout and login as a different user and it shows Welcome Test Account One
> until i hit refresh then it shows Test Account Two
>
> I have wrapped the element in a  block.
>
> Logout destroy session but same thing. It always shows the last logged in
> user info until i hit refresh.
>
> Same thing happens on the site where i delete a post, after succesful delete
> i redirect back to the page where i was deleting the post and its still
> there until i refresh. And it to is wrapped in a no cache block.
>
> Any ideas why? How to avoid this?
>
> Thanks,
>
> Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache View dose not work

2009-10-09 Thread Simon

yes i did that too

On Oct 9, 2:56 am, Marco  wrote:
> Did you set Configure::Cache.check to true in core.php?
>
> Marco
>
> On Oct 8, 1:45 pm, Simon  wrote:
>
>
>
> > i tired both
> > element('logininfo', array('cache' => false)); ?>
> > => this dosen't work at all
>
> > in the element i tired  which i see no
> > debug error even though i set the debug 2
> > but when i see the view source page i get the errorr that i posted
> > above
> > thats wired problem that i cant figure out
> > thank you
>
> > On Oct 8, 9:29 am, Miles J  wrote:
>
> > > Try playing the nocache tags in the element itself. You can also pass
> > > an option to the element ofcache= false.
>
> > > element('logininfo', array('cache' => false)); ?>
>
> > > On Oct 8, 9:26 am, Simon  wrote:
>
> > > > haven't tried to remove thecachehelper would  that make any
> > > > difference ?
>
> > > > sorry i just wrote the  twice in this post  but the code
> > > > is like this see below in my layout
>
> > > > 
> > > > element('logininfo'); ?>
> > > > 
>
> > > > On Oct 8, 9:17 am, Miles J  wrote:
>
> > > > > Do you get an error when we remove thecachehelper?
>
> > > > > Also the code should be:
>
> > > > > 
> > > > > element('logininfo'); ?>
> > > > > 
>
> > > > > On Oct 8, 7:44 am, Simon  wrote:
>
> > > > > > well in that element it has the login user info which you dont wanna
> > > > > >cache
> > > > > > here is what i have in post controller
>
> > > > > >  var $helpers = array('Cache');
>
> > > > > > in my view  action i have this
>
> > > > > > $this->cacheAction = '1 hour';
>
> > > > > > then in my default layout i have this element which i put the
> > > > > > 
> > > > > > 
> > > > > > element('logininfo'); ?>
> > > > > > 
> > > > > > then i get errorr which i can't see in the browser i did view source
>
> > > > > > this is the ouput of error
>
> > > > > > 
> > > > > > Notice > > > > > b> (8): Undefined property: stdClass::$model [CORE\cake\libs
> > > > > > \view\helper.php, line 333]
> > > > > > 
> > > > > >  > > > > > onclick='document.getElementById
> > > > > > ("CakeErrorCode1").style.display = (document.getElementById
> > > > > > ("CakeErrorCode1").style.display == "none" ? "" : "none")'>Code 
> > > > > > |
> > > > > > Context > > > > > a>$entity  =       "User."
> > > > > > $setScope       =       true
> > > > > > $view   =       stdClass
> > > > > > stdClass::$modelScope = false > > > > > class="cake-code-dump" style="display: none;"> > > > > > style="color:
> > > > > > #00">} > > > > > code>
> > > > > > 
> > > > > > 
> > > > > > $model = $view->model;
> > > > > > Helper::setEntity() - 
> > > > > > CORE\cake\libs\view\helper.php,
> > > > > > line 333
> > > > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 
> > > > > > 122
> > > > > > include - APP\views\elements\slide.ctp, line 9
> > > > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > > > 121
> > > > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > > > [main] - APP\webroot\index.php, line 90
> > > > > > 
> > > > > > Notice > > > > > b> (8): Undefined property: stdClass::$association [CORE\cake
> > > > > > \libs\view\helper.php, line 366]
> > > > > > 
> > > > > >  > > > > > onclick='document.getElementById
> > > > > > ("CakeErrorCode2").style.display = (document.getElementById
> > > > > > ("CakeErrorCode2").style.display == "none" ? "" : "none")'>Code 
> > > > > > |
> > > > > > Context > > > > > a>$entity  =       "User."
> > > > > > $setScope       =       true
> > > > > > $view   =       stdClass
> > > > > > stdClass::$modelScope = false
> > > > > > $model  =       null
> > > > > > $hasField       =       false
> > > > > > $sameScope      =       true
> > > > > > $parts  =       array(
> > > > > >         "User"
> > > > > > ) > > > > > style="display:
> > > > > > none;">} > > > > > code>
> > > > > > 
> > > > > > if (!
> > > > > > $view->association && $parts[0] == 
> > > > > > $view->field && $view->field != 
> > > > > > $view->model) {
> > > > > > Helper::setEntity() - 
> > > > > > CORE\cake\libs\view\helper.php,
> > > > > > line 366
> > > > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 
> > > > > > 122
> > > > > > include - APP\views\elements\slide.ctp, line 9
> > > > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > > > 121
> > > > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > > > Dispatcher::dispatch() - CORE\cake\dis

Re: Cache View dose not work

2009-10-09 Thread Marco

Did you set Configure::Cache.check to true in core.php?

Marco

On Oct 8, 1:45 pm, Simon  wrote:
> i tired both
> element('logininfo', array('cache' => false)); ?>
> => this dosen't work at all
>
> in the element i tired  which i see no
> debug error even though i set the debug 2
> but when i see the view source page i get the errorr that i posted
> above
> thats wired problem that i cant figure out
> thank you
>
> On Oct 8, 9:29 am, Miles J  wrote:
>
>
>
> > Try playing the nocache tags in the element itself. You can also pass
> > an option to the element of cache = false.
>
> > element('logininfo', array('cache' => false)); ?>
>
> > On Oct 8, 9:26 am, Simon  wrote:
>
> > > haven't tried to remove the cache helper would  that make any
> > > difference ?
>
> > > sorry i just wrote the  twice in this post  but the code
> > > is like this see below in my layout
>
> > > 
> > > element('logininfo'); ?>
> > > 
>
> > > On Oct 8, 9:17 am, Miles J  wrote:
>
> > > > Do you get an error when we remove the cache helper?
>
> > > > Also the code should be:
>
> > > > 
> > > > element('logininfo'); ?>
> > > > 
>
> > > > On Oct 8, 7:44 am, Simon  wrote:
>
> > > > > well in that element it has the login user info which you dont wanna
> > > > > cache
> > > > > here is what i have in post controller
>
> > > > >  var $helpers = array('Cache');
>
> > > > > in my view  action i have this
>
> > > > > $this->cacheAction = '1 hour';
>
> > > > > then in my default layout i have this element which i put the
> > > > > 
> > > > > 
> > > > > element('logininfo'); ?>
> > > > > 
> > > > > then i get errorr which i can't see in the browser i did view source
>
> > > > > this is the ouput of error
>
> > > > > 
> > > > > Notice > > > > b> (8): Undefined property: stdClass::$model [CORE\cake\libs
> > > > > \view\helper.php, line 333]
> > > > > 
> > > > > Code |
> > > > > Context > > > > a>$entity  =       "User."
> > > > > $setScope       =       true
> > > > > $view   =       stdClass
> > > > > stdClass::$modelScope = false > > > > class="cake-code-dump" style="display: none;"> > > > > style="color:
> > > > > #00">} > > > > code>
> > > > > 
> > > > > 
> > > > > $model = $view->model;
> > > > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > > line 333
> > > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > > include - APP\views\elements\slide.ctp, line 9
> > > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > > 121
> > > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > > [main] - APP\webroot\index.php, line 90
> > > > > 
> > > > > Notice > > > > b> (8): Undefined property: stdClass::$association [CORE\cake
> > > > > \libs\view\helper.php, line 366]
> > > > > 
> > > > > Code |
> > > > > Context > > > > a>$entity  =       "User."
> > > > > $setScope       =       true
> > > > > $view   =       stdClass
> > > > > stdClass::$modelScope = false
> > > > > $model  =       null
> > > > > $hasField       =       false
> > > > > $sameScope      =       true
> > > > > $parts  =       array(
> > > > >         "User"
> > > > > )} > > > > code>
> > > > > 
> > > > > if (!
> > > > > $view->association && $parts[0] == 
> > > > > $view->field && $view->field != 
> > > > > $view->model) {
> > > > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > > line 366
> > > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > > include - APP\views\elements\slide.ctp, line 9
> > > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > > 121
> > > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > > [main] - APP\webroot\index.php, line 90
> > > > > 
> > > > > Notice > > > > b> (8): Undefined property: stdClass::$field [CORE\cake\libs
> > > > > \view\helper.php, line 366]
> > > > > 
> > > > > Code |
> > > > > Context > > > > a>$entity  =       "User."
> > > > > $setScope       =       true
> > > > > $view   =       stdClass
> > > > > stdClass::$modelScope = false
> > > > > $model  =       null
> > > > > $hasField       =       false
> > > > > $sameScope      =       true
> > > > > $parts  =       array(
> > > > >         "User"
> > > > > )} > > > > code>
> > > > > 
> > > > > if (!
> > > > > $view->association && $parts[0] == 
> > > > > $view->field && $view->field != 
> > > > > $view->model) {
> > > > >

Re: Cache View dose not work

2009-10-08 Thread Simon

i tired both
element('logininfo', array('cache' => false)); ?>
=> this dosen't work at all

in the element i tired  which i see no
debug error even though i set the debug 2
but when i see the view source page i get the errorr that i posted
above
thats wired problem that i cant figure out
thank you


On Oct 8, 9:29 am, Miles J  wrote:
> Try playing the nocache tags in the element itself. You can also pass
> an option to the element of cache = false.
>
> element('logininfo', array('cache' => false)); ?>
>
> On Oct 8, 9:26 am, Simon  wrote:
>
>
>
> > haven't tried to remove the cache helper would  that make any
> > difference ?
>
> > sorry i just wrote the  twice in this post  but the code
> > is like this see below in my layout
>
> > 
> > element('logininfo'); ?>
> > 
>
> > On Oct 8, 9:17 am, Miles J  wrote:
>
> > > Do you get an error when we remove the cache helper?
>
> > > Also the code should be:
>
> > > 
> > > element('logininfo'); ?>
> > > 
>
> > > On Oct 8, 7:44 am, Simon  wrote:
>
> > > > well in that element it has the login user info which you dont wanna
> > > > cache
> > > > here is what i have in post controller
>
> > > >  var $helpers = array('Cache');
>
> > > > in my view  action i have this
>
> > > > $this->cacheAction = '1 hour';
>
> > > > then in my default layout i have this element which i put the
> > > > 
> > > > 
> > > > element('logininfo'); ?>
> > > > 
> > > > then i get errorr which i can't see in the browser i did view source
>
> > > > this is the ouput of error
>
> > > > 
> > > > Notice > > > b> (8): Undefined property: stdClass::$model [CORE\cake\libs
> > > > \view\helper.php, line 333]
> > > > 
> > > > Code |
> > > > Context > > > a>$entity  =       "User."
> > > > $setScope       =       true
> > > > $view   =       stdClass
> > > > stdClass::$modelScope = false > > > class="cake-code-dump" style="display: none;"> > > > style="color:
> > > > #00">} > > > code>
> > > > 
> > > > 
> > > > $model = $view->model;
> > > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > line 333
> > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > include - APP\views\elements\slide.ctp, line 9
> > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > 121
> > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > [main] - APP\webroot\index.php, line 90
> > > > 
> > > > Notice > > > b> (8): Undefined property: stdClass::$association [CORE\cake
> > > > \libs\view\helper.php, line 366]
> > > > 
> > > > Code |
> > > > Context > > > a>$entity  =       "User."
> > > > $setScope       =       true
> > > > $view   =       stdClass
> > > > stdClass::$modelScope = false
> > > > $model  =       null
> > > > $hasField       =       false
> > > > $sameScope      =       true
> > > > $parts  =       array(
> > > >         "User"
> > > > )} > > > code>
> > > > 
> > > > if (!
> > > > $view->association && $parts[0] == 
> > > > $view->field && $view->field != 
> > > > $view->model) {
> > > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > line 366
> > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > include - APP\views\elements\slide.ctp, line 9
> > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > > 121
> > > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > > [main] - APP\webroot\index.php, line 90
> > > > 
> > > > Notice > > > b> (8): Undefined property: stdClass::$field [CORE\cake\libs
> > > > \view\helper.php, line 366]
> > > > 
> > > > Code |
> > > > Context > > > a>$entity  =       "User."
> > > > $setScope       =       true
> > > > $view   =       stdClass
> > > > stdClass::$modelScope = false
> > > > $model  =       null
> > > > $hasField       =       false
> > > > $sameScope      =       true
> > > > $parts  =       array(
> > > >         "User"
> > > > )} > > > code>
> > > > 
> > > > if (!
> > > > $view->association && $parts[0] == 
> > > > $view->field && $view->field != 
> > > > $view->model) {
> > > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > > line 366
> > > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > > include - APP\views\elements\slide.ctp, line 9
> > > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > > include - APP\tmp

Re: Cache View dose not work

2009-10-08 Thread Miles J

Try playing the nocache tags in the element itself. You can also pass
an option to the element of cache = false.

element('logininfo', array('cache' => false)); ?>

On Oct 8, 9:26 am, Simon  wrote:
> haven't tried to remove the cache helper would  that make any
> difference ?
>
> sorry i just wrote the  twice in this post  but the code
> is like this see below in my layout
>
> 
> element('logininfo'); ?>
> 
>
> On Oct 8, 9:17 am, Miles J  wrote:
>
> > Do you get an error when we remove the cache helper?
>
> > Also the code should be:
>
> > 
> > element('logininfo'); ?>
> > 
>
> > On Oct 8, 7:44 am, Simon  wrote:
>
> > > well in that element it has the login user info which you dont wanna
> > > cache
> > > here is what i have in post controller
>
> > >  var $helpers = array('Cache');
>
> > > in my view  action i have this
>
> > > $this->cacheAction = '1 hour';
>
> > > then in my default layout i have this element which i put the
> > > 
> > > 
> > > element('logininfo'); ?>
> > > 
> > > then i get errorr which i can't see in the browser i did view source
>
> > > this is the ouput of error
>
> > > 
> > > Notice > > b> (8): Undefined property: stdClass::$model [CORE\cake\libs
> > > \view\helper.php, line 333]
> > > 
> > > Code |
> > > Context > > a>$entity  =       "User."
> > > $setScope       =       true
> > > $view   =       stdClass
> > > stdClass::$modelScope = false > > class="cake-code-dump" style="display: none;"> > > style="color:
> > > #00">} > > code>
> > > 
> > > 
> > > $model = $view->model;
> > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > line 333
> > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > include - APP\views\elements\slide.ctp, line 9
> > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > 121
> > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > [main] - APP\webroot\index.php, line 90
> > > 
> > > Notice > > b> (8): Undefined property: stdClass::$association [CORE\cake
> > > \libs\view\helper.php, line 366]
> > > 
> > > Code |
> > > Context > > a>$entity  =       "User."
> > > $setScope       =       true
> > > $view   =       stdClass
> > > stdClass::$modelScope = false
> > > $model  =       null
> > > $hasField       =       false
> > > $sameScope      =       true
> > > $parts  =       array(
> > >         "User"
> > > )} > > code>
> > > 
> > > if (!
> > > $view->association && $parts[0] == 
> > > $view->field && $view->field != 
> > > $view->model) {
> > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > line 366
> > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > include - APP\views\elements\slide.ctp, line 9
> > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > 121
> > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > [main] - APP\webroot\index.php, line 90
> > > 
> > > Notice > > b> (8): Undefined property: stdClass::$field [CORE\cake\libs
> > > \view\helper.php, line 366]
> > > 
> > > Code |
> > > Context > > a>$entity  =       "User."
> > > $setScope       =       true
> > > $view   =       stdClass
> > > stdClass::$modelScope = false
> > > $model  =       null
> > > $hasField       =       false
> > > $sameScope      =       true
> > > $parts  =       array(
> > >         "User"
> > > )} > > code>
> > > 
> > > if (!
> > > $view->association && $parts[0] == 
> > > $view->field && $view->field != 
> > > $view->model) {
> > > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > > line 366
> > > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > > include - APP\views\elements\slide.ctp, line 9
> > > View::_render() - CORE\cake\libs\view\view.php, line 654
> > > View::element() - CORE\cake\libs\view\view.php, line 339
> > > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > > 121
> > > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > > [main] - APP\webroot\index.php, line 90
> > > 
> > > Notice > > b> (8): Trying to get property of non-object [CORE\cake\libs
> > > \view\helpers\form.php, line 185]
> > > 
> > > Code |
> > > Context > > a>$model   =       "User"
> > > $options        =       array(
> > >         "type" => "post",
> > >         "action" => "login",

Re: Cache View dose not work

2009-10-08 Thread Simon

haven't tried to remove the cache helper would  that make any
difference ?

sorry i just wrote the  twice in this post  but the code
is like this see below in my layout


element('logininfo'); ?>



On Oct 8, 9:17 am, Miles J  wrote:
> Do you get an error when we remove the cache helper?
>
> Also the code should be:
>
> 
> element('logininfo'); ?>
> 
>
> On Oct 8, 7:44 am, Simon  wrote:
>
>
>
> > well in that element it has the login user info which you dont wanna
> > cache
> > here is what i have in post controller
>
> >  var $helpers = array('Cache');
>
> > in my view  action i have this
>
> > $this->cacheAction = '1 hour';
>
> > then in my default layout i have this element which i put the
> > 
> > 
> > element('logininfo'); ?>
> > 
> > then i get errorr which i can't see in the browser i did view source
>
> > this is the ouput of error
>
> > 
> > Notice > b> (8): Undefined property: stdClass::$model [CORE\cake\libs
> > \view\helper.php, line 333]
> > 
> > Code |
> > Context > a>$entity  =       "User."
> > $setScope       =       true
> > $view   =       stdClass
> > stdClass::$modelScope = false > class="cake-code-dump" style="display: none;"> > style="color:
> > #00">} > code>
> > 
> > 
> > $model = $view->model;
> > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > line 333
> > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > include - APP\views\elements\slide.ctp, line 9
> > View::_render() - CORE\cake\libs\view\view.php, line 654
> > View::element() - CORE\cake\libs\view\view.php, line 339
> > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > 121
> > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > [main] - APP\webroot\index.php, line 90
> > 
> > Notice > b> (8): Undefined property: stdClass::$association [CORE\cake
> > \libs\view\helper.php, line 366]
> > 
> > Code |
> > Context > a>$entity  =       "User."
> > $setScope       =       true
> > $view   =       stdClass
> > stdClass::$modelScope = false
> > $model  =       null
> > $hasField       =       false
> > $sameScope      =       true
> > $parts  =       array(
> >         "User"
> > )} > code>
> > 
> > if (!
> > $view->association && $parts[0] == 
> > $view->field && $view->field != 
> > $view->model) {
> > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > line 366
> > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > include - APP\views\elements\slide.ctp, line 9
> > View::_render() - CORE\cake\libs\view\view.php, line 654
> > View::element() - CORE\cake\libs\view\view.php, line 339
> > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > 121
> > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > [main] - APP\webroot\index.php, line 90
> > 
> > Notice > b> (8): Undefined property: stdClass::$field [CORE\cake\libs
> > \view\helper.php, line 366]
> > 
> > Code |
> > Context > a>$entity  =       "User."
> > $setScope       =       true
> > $view   =       stdClass
> > stdClass::$modelScope = false
> > $model  =       null
> > $hasField       =       false
> > $sameScope      =       true
> > $parts  =       array(
> >         "User"
> > )} > code>
> > 
> > if (!
> > $view->association && $parts[0] == 
> > $view->field && $view->field != 
> > $view->model) {
> > Helper::setEntity() - CORE\cake\libs\view\helper.php,
> > line 366
> > FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> > include - APP\views\elements\slide.ctp, line 9
> > View::_render() - CORE\cake\libs\view\view.php, line 654
> > View::element() - CORE\cake\libs\view\view.php, line 339
> > include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> > 121
> > View::renderCache() - CORE\cake\libs\view\view.php, line 483
> > Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> > [main] - APP\webroot\index.php, line 90
> > 
> > Notice > b> (8): Trying to get property of non-object [CORE\cake\libs
> > \view\helpers\form.php, line 185]
> > 
> > Code |
> > Context > a>$model   =       "User"
> > $options        =       array(
> >         "type" => "post",
> >         "action" => "login",
> >         "url" => array(
> >         "controller" => "users"
> > ),
> >         "default" => true
> > )
> > $defaultModel   =       null
> > $view   =       false
> > $models =       array()
> > $append =       ""
> > $id     =       false
> > $created        =       false
> > $data   =       array(
> >         "fields" => array(),
> >         "key" => "id",
> >         "validates" => array()
> > )
> > $recordExists   =       false > class="cake-code-
> > dump" styl

Re: Cache View dose not work

2009-10-08 Thread Miles J

Do you get an error when we remove the cache helper?

Also the code should be:


element('logininfo'); ?>


On Oct 8, 7:44 am, Simon  wrote:
> well in that element it has the login user info which you dont wanna
> cache
> here is what i have in post controller
>
>  var $helpers = array('Cache');
>
> in my view  action i have this
>
> $this->cacheAction = '1 hour';
>
> then in my default layout i have this element which i put the
> 
> 
> element('logininfo'); ?>
> 
> then i get errorr which i can't see in the browser i did view source
>
> this is the ouput of error
>
> 
> Notice b> (8): Undefined property: stdClass::$model [CORE\cake\libs
> \view\helper.php, line 333]
> 
> Code |
> Context a>$entity  =       "User."
> $setScope       =       true
> $view   =       stdClass
> stdClass::$modelScope = false class="cake-code-dump" style="display: none;"> style="color:
> #00">} code>
> 
> 
> $model = $view->model;
> Helper::setEntity() - CORE\cake\libs\view\helper.php,
> line 333
> FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> include - APP\views\elements\slide.ctp, line 9
> View::_render() - CORE\cake\libs\view\view.php, line 654
> View::element() - CORE\cake\libs\view\view.php, line 339
> include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> 121
> View::renderCache() - CORE\cake\libs\view\view.php, line 483
> Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> [main] - APP\webroot\index.php, line 90
> 
> Notice b> (8): Undefined property: stdClass::$association [CORE\cake
> \libs\view\helper.php, line 366]
> 
> Code |
> Context a>$entity  =       "User."
> $setScope       =       true
> $view   =       stdClass
> stdClass::$modelScope = false
> $model  =       null
> $hasField       =       false
> $sameScope      =       true
> $parts  =       array(
>         "User"
> )} code>
> 
> if (!
> $view->association && $parts[0] == 
> $view->field && $view->field != 
> $view->model) {
> Helper::setEntity() - CORE\cake\libs\view\helper.php,
> line 366
> FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> include - APP\views\elements\slide.ctp, line 9
> View::_render() - CORE\cake\libs\view\view.php, line 654
> View::element() - CORE\cake\libs\view\view.php, line 339
> include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> 121
> View::renderCache() - CORE\cake\libs\view\view.php, line 483
> Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> [main] - APP\webroot\index.php, line 90
> 
> Notice b> (8): Undefined property: stdClass::$field [CORE\cake\libs
> \view\helper.php, line 366]
> 
> Code |
> Context a>$entity  =       "User."
> $setScope       =       true
> $view   =       stdClass
> stdClass::$modelScope = false
> $model  =       null
> $hasField       =       false
> $sameScope      =       true
> $parts  =       array(
>         "User"
> )} code>
> 
> if (!
> $view->association && $parts[0] == 
> $view->field && $view->field != 
> $view->model) {
> Helper::setEntity() - CORE\cake\libs\view\helper.php,
> line 366
> FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
> include - APP\views\elements\slide.ctp, line 9
> View::_render() - CORE\cake\libs\view\view.php, line 654
> View::element() - CORE\cake\libs\view\view.php, line 339
> include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> 121
> View::renderCache() - CORE\cake\libs\view\view.php, line 483
> Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
> [main] - APP\webroot\index.php, line 90
> 
> Notice b> (8): Trying to get property of non-object [CORE\cake\libs
> \view\helpers\form.php, line 185]
> 
> Code |
> Context a>$model   =       "User"
> $options        =       array(
>         "type" => "post",
>         "action" => "login",
>         "url" => array(
>         "controller" => "users"
> ),
>         "default" => true
> )
> $defaultModel   =       null
> $view   =       false
> $models =       array()
> $append =       ""
> $id     =       false
> $created        =       false
> $data   =       array(
>         "fields" => array(),
>         "key" => "id",
>         "validates" => array()
> )
> $recordExists   =       false
> $actionDefaults = array(
> 'plugin' => 
> $this->plugin,
> 'controller' => 
> $view->viewPath,
> FormHelper::create() - CORE\cake\libs\view\helpers
> \form.php, line 185
> include - APP\views\elements\slide.ctp, line 9
> View::_render() - CORE\cake\libs\view\view.php, line 654
> View::element() - CORE\cake\libs\view\view.php, line 339
> include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
> 121
> View::renderCache() - CORE\cake\libs\view\view.php, line 483
> Dispatcher::cached() - CORE\cake\dispatcher.php

Re: Cache View dose not work

2009-10-08 Thread Simon

well in that element it has the login user info which you dont wanna
cache
here is what i have in post controller

 var $helpers = array('Cache');

in my view  action i have this

$this->cacheAction = '1 hour';


then in my default layout i have this element which i put the


element('logininfo'); ?>

then i get errorr which i can't see in the browser i did view source

this is the ouput of error


Notice (8): Undefined property: stdClass::$model [CORE\cake\libs
\view\helper.php, line 333]

Code |
Context$entity  =   "User."
$setScope   =   true
$view   =   stdClass
stdClass::$modelScope = false}


$model = $view->model;
Helper::setEntity() - CORE\cake\libs\view\helper.php,
line 333
FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
include - APP\views\elements\slide.ctp, line 9
View::_render() - CORE\cake\libs\view\view.php, line 654
View::element() - CORE\cake\libs\view\view.php, line 339
include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
121
View::renderCache() - CORE\cake\libs\view\view.php, line 483
Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
[main] - APP\webroot\index.php, line 90

Notice (8): Undefined property: stdClass::$association [CORE\cake
\libs\view\helper.php, line 366]

Code |
Context$entity  =   "User."
$setScope   =   true
$view   =   stdClass
stdClass::$modelScope = false
$model  =   null
$hasField   =   false
$sameScope  =   true
$parts  =   array(
"User"
)}

if (!
$view->association && $parts[0] == 
$view->field && $view->field != 
$view->model) {
Helper::setEntity() - CORE\cake\libs\view\helper.php,
line 366
FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
include - APP\views\elements\slide.ctp, line 9
View::_render() - CORE\cake\libs\view\view.php, line 654
View::element() - CORE\cake\libs\view\view.php, line 339
include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
121
View::renderCache() - CORE\cake\libs\view\view.php, line 483
Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
[main] - APP\webroot\index.php, line 90

Notice (8): Undefined property: stdClass::$field [CORE\cake\libs
\view\helper.php, line 366]

Code |
Context$entity  =   "User."
$setScope   =   true
$view   =   stdClass
stdClass::$modelScope = false
$model  =   null
$hasField   =   false
$sameScope  =   true
$parts  =   array(
"User"
)}

if (!
$view->association && $parts[0] == 
$view->field && $view->field != 
$view->model) {
Helper::setEntity() - CORE\cake\libs\view\helper.php,
line 366
FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 122
include - APP\views\elements\slide.ctp, line 9
View::_render() - CORE\cake\libs\view\view.php, line 654
View::element() - CORE\cake\libs\view\view.php, line 339
include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
121
View::renderCache() - CORE\cake\libs\view\view.php, line 483
Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
[main] - APP\webroot\index.php, line 90

Notice (8): Trying to get property of non-object [CORE\cake\libs
\view\helpers\form.php, line 185]

Code |
Context$model   =   "User"
$options=   array(
"type" => "post",
"action" => "login",
"url" => array(
"controller" => "users"
),
"default" => true
)
$defaultModel   =   null
$view   =   false
$models =   array()
$append =   ""
$id =   false
$created=   false
$data   =   array(
"fields" => array(),
"key" => "id",
"validates" => array()
)
$recordExists   =   false
$actionDefaults = array(
'plugin' => 
$this->plugin,
'controller' => 
$view->viewPath,
FormHelper::create() - CORE\cake\libs\view\helpers
\form.php, line 185
include - APP\views\elements\slide.ctp, line 9
View::_render() - CORE\cake\libs\view\view.php, line 654
View::element() - CORE\cake\libs\view\view.php, line 339
include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
121
View::renderCache() - CORE\cake\libs\view\view.php, line 483
Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 130
[main] - APP\webroot\index.php, line 90
Fatal error:  Call to a member function entity() on a non-
object in C:\xampp\htdocs\cake\cake\libs\view\helper.php on
line 321
iew.php, line 654
View::element() - CORE\cake\libs\view\view.php, line 339
include - APP\tmp\cache\views\new_recipes_category_Basics.php, line
121
View::renderCache() - CORE\cake\libs\view\view.php, line 483
Dispatcher::cached() - CORE\cake\dispatcher.php, line 718
Dispatcher::dispatch() - CORE\cake\di

Re: Cache View dose not work

2009-10-07 Thread Miles J

Can we see some code? Also if its an element, wouldn't it always be
the same? Or are you passing dynamic data.

On Oct 7, 2:31 pm, Simon  wrote:
> i'm having problems with cache i have post controller which i enable
> it to cache the view action only
>
> but some how it cache the element that locate at default layout even
> if i put 
> the result is same
>
> any idea
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache Problem with safari 4

2009-09-14 Thread p_tucky

Thanks, for your ans Martin Westin & Marcelo Andrade.


On Sep 14, 1:13 pm, Martin Westin  wrote:
> I am sure Safari does cache the page for you. My feeling is that you
> can't fix this with a header. My feeling is that Safari has this
> "feature" for some kinds of "back-clicking" no matter what you do.
> Possibly it is to aid javascript-heavy sites.
>
> If I click away now, in the middle of typing this post, I can click
> back and still have my text in this ajax-loaded field on the page.
> Neither the field nor the text were there when the page loaded. That
> is not how FF or any other browser works afaik.
>
> I guess the old rule still applies. Back-buttons are for websites...
> not applications. :)
> (try clicking back in gmail for example)
>
> /Martin
>
> On Sep 13, 7:33 am, p_tucky  wrote:
>
> > Please test on FF3.5, IE7+ , and Safari4
>
> >http://perhabs.com/cake_test
>
> > user: test
> > pass: test
>
> > please look at display current time under login button.
> > After login then click "back button" then see display time Firefox and
> > IE will show you new time but Safari still display cache time.
>
> > That's why I mention Safari still cache.
>
> > Thanks
>
> > On Sep 11, 2:03 pm, Martin Westin  wrote:
>
> > > I am not sure that is a cache problem or anything you can fix. Are you
> > > sure
>
> > > I use Safari 4 all the time and I am under the impression that the
> > > browser sometimes doesn't do any request at all when using the back
> > > button. It simply re-displays what it a few moments ago. I have not
> > > checked if the browser technically does a request or not. It is just a
> > > feeling I get.
>
> > > /Martin
>
> > > On Sep 11, 6:13 am, p_tucky  wrote:
>
> > > > Hi, I have cache problem with safari 4.
> > > > Any one have problem like me?
>
> > > > I’ve tried with this code but does not work. It take me to the
> > > > previous page and have still show the text on form.
>
> > > > function beforeFilter()
> > > > {
>
> > > >    if($this->action == ‘login’) {
> > > >           $this->disableCache();
> > > >    }
>
> > > >     Header( “Last-Modified: ” . gmdate( “D, j M Y H:i:s” ) . ” GMT” );
> > > >     Header( “Expires: ” . gmdate( “D, j M Y H:i:s”, time() ) . ”
> > > > GMT” );
> > > >     Header( “Cache-Control: no-store, no-cache, must-revalidate” );
>
> > > > }
>
> > > > FF and IE both don’t have any problem, when click “back button” and no
> > > > cache.
> > > > Safari 4 it seem still have cache when click “back button”.
>
> > > > Any solution please advise.
> > > > Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache Problem with safari 4

2009-09-13 Thread Martin Westin


I am sure Safari does cache the page for you. My feeling is that you
can't fix this with a header. My feeling is that Safari has this
"feature" for some kinds of "back-clicking" no matter what you do.
Possibly it is to aid javascript-heavy sites.

If I click away now, in the middle of typing this post, I can click
back and still have my text in this ajax-loaded field on the page.
Neither the field nor the text were there when the page loaded. That
is not how FF or any other browser works afaik.

I guess the old rule still applies. Back-buttons are for websites...
not applications. :)
(try clicking back in gmail for example)

/Martin


On Sep 13, 7:33 am, p_tucky  wrote:
> Please test on FF3.5, IE7+ , and Safari4
>
> http://perhabs.com/cake_test
>
> user: test
> pass: test
>
> please look at display current time under login button.
> After login then click "back button" then see display time Firefox and
> IE will show you new time but Safari still display cache time.
>
> That's why I mention Safari still cache.
>
> Thanks
>
> On Sep 11, 2:03 pm, Martin Westin  wrote:
>
>
>
> > I am not sure that is a cache problem or anything you can fix. Are you
> > sure
>
> > I use Safari 4 all the time and I am under the impression that the
> > browser sometimes doesn't do any request at all when using the back
> > button. It simply re-displays what it a few moments ago. I have not
> > checked if the browser technically does a request or not. It is just a
> > feeling I get.
>
> > /Martin
>
> > On Sep 11, 6:13 am, p_tucky  wrote:
>
> > > Hi, I have cache problem with safari 4.
> > > Any one have problem like me?
>
> > > I’ve tried with this code but does not work. It take me to the
> > > previous page and have still show the text on form.
>
> > > function beforeFilter()
> > > {
>
> > >    if($this->action == ‘login’) {
> > >           $this->disableCache();
> > >    }
>
> > >     Header( “Last-Modified: ” . gmdate( “D, j M Y H:i:s” ) . ” GMT” );
> > >     Header( “Expires: ” . gmdate( “D, j M Y H:i:s”, time() ) . ”
> > > GMT” );
> > >     Header( “Cache-Control: no-store, no-cache, must-revalidate” );
>
> > > }
>
> > > FF and IE both don’t have any problem, when click “back button” and no
> > > cache.
> > > Safari 4 it seem still have cache when click “back button”.
>
> > > Any solution please advise.
> > > Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache Problem with safari 4

2009-09-13 Thread Marcelo Andrade

On Sun, Sep 13, 2009 at 7:33 AM, p_tucky  wrote:
>
> Please test on FF3.5, IE7+ , and Safari4
>
> http://perhabs.com/cake_test
>
> user: test
> pass: test
>
> please look at display current time under login button.
> After login then click "back button" then see display time Firefox and
> IE will show you new time but Safari still display cache time.
>
> That's why I mention Safari still cache.

Did you tried to wrap the clock code in
the view with  tags ?

http://book.cakephp.org/view/347/Marking-Non-Cached-Content-in-Views

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105

http://mfandrade.wordpress.com

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



Re: Cache Problem with safari 4

2009-09-12 Thread p_tucky

Please test on FF3.5, IE7+ , and Safari4

http://perhabs.com/cake_test

user: test
pass: test

please look at display current time under login button.
After login then click "back button" then see display time Firefox and
IE will show you new time but Safari still display cache time.

That's why I mention Safari still cache.

Thanks



On Sep 11, 2:03 pm, Martin Westin  wrote:
> I am not sure that is a cache problem or anything you can fix. Are you
> sure
>
> I use Safari 4 all the time and I am under the impression that the
> browser sometimes doesn't do any request at all when using the back
> button. It simply re-displays what it a few moments ago. I have not
> checked if the browser technically does a request or not. It is just a
> feeling I get.
>
> /Martin
>
> On Sep 11, 6:13 am, p_tucky  wrote:
>
> > Hi, I have cache problem with safari 4.
> > Any one have problem like me?
>
> > I’ve tried with this code but does not work. It take me to the
> > previous page and have still show the text on form.
>
> > function beforeFilter()
> > {
>
> >    if($this->action == ‘login’) {
> >           $this->disableCache();
> >    }
>
> >     Header( “Last-Modified: ” . gmdate( “D, j M Y H:i:s” ) . ” GMT” );
> >     Header( “Expires: ” . gmdate( “D, j M Y H:i:s”, time() ) . ”
> > GMT” );
> >     Header( “Cache-Control: no-store, no-cache, must-revalidate” );
>
> > }
>
> > FF and IE both don’t have any problem, when click “back button” and no
> > cache.
> > Safari 4 it seem still have cache when click “back button”.
>
> > Any solution please advise.
> > Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache Problem with safari 4

2009-09-11 Thread Martin Westin

I am not sure that is a cache problem or anything you can fix. Are you
sure

I use Safari 4 all the time and I am under the impression that the
browser sometimes doesn't do any request at all when using the back
button. It simply re-displays what it a few moments ago. I have not
checked if the browser technically does a request or not. It is just a
feeling I get.

/Martin


On Sep 11, 6:13 am, p_tucky  wrote:
> Hi, I have cache problem with safari 4.
> Any one have problem like me?
>
> I’ve tried with this code but does not work. It take me to the
> previous page and have still show the text on form.
>
> function beforeFilter()
> {
>
>if($this->action == ‘login’) {
>   $this->disableCache();
>}
>
> Header( “Last-Modified: ” . gmdate( “D, j M Y H:i:s” ) . ” GMT” );
> Header( “Expires: ” . gmdate( “D, j M Y H:i:s”, time() ) . ”
> GMT” );
> Header( “Cache-Control: no-store, no-cache, must-revalidate” );
>
> }
>
> FF and IE both don’t have any problem, when click “back button” and no
> cache.
> Safari 4 it seem still have cache when click “back button”.
>
> Any solution please advise.
> Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cache not configured properly

2009-07-27 Thread Eric

Thanks - memcached was not installed correctly.

So it was defaulting back to file caching? I didn't realize you can
cache an individual variable with file caching like that. With no load
on the server, it was just as fast.

On Jul 26, 12:04 pm, "euromark (munich)" 
wrote:
> i thought so
>
> with
> apt-get install php5-memcache
>
> + editing of php.ini
>
> BUT i found a typo
> extension=memcached.so  (/etc/php5/apache2/php.ini)
> should be
> extension=memcache.so  (/etc/php5/apache2/php.ini)
>
> then it works just fine:
>
> "The MemcacheEngine is being used for caching. To change the config
> edit APP/config/core.php "
>
> On 26 Jul., 17:05, brian  wrote:
>
>
>
> > On Sun, Jul 26, 2009 at 7:48 AM, euromark
>
> > (munich) wrote:
>
> > > i doubt that your memcache is working^^
> > > actually, it falls back to "file caching" if memcache cannot be used:
>
> > > trigger_error('Cache not configured properly. Please check
> > > Cache::config(); in APP/config/core.php', E_USER_WARNING);
> > > $cache = Cache::config('default', array('engine' => 'File'));
>
> > > you can see that if you check out the default "home" page (home.ctp in
> > > cake)
>
> > > anyway.. in my case the problem seems to be that there is no
> > > "Memcache" class
>
> > > $memcache = new Memcache; $memcache->addServer('xxx.xx.xx.xx', 11211);
> > > $version = $memcache->getVersion(); print_r($memcache->getExtendedStats
> > > ()); $cacheKey = $memcache->get("cake_homepage"); echo($cacheKey);
> > > echo "Server's version: ".$version."\n";
>
> > > returns
>
> > > Fatal error: Class 'Memcache' not found in /home/web/test/comm/views/
> > > pages/homes.ctp on line 2
>
> > > any idea whats missing here?
> > > thx, mark
>
> > memcached? Is it installed?http://www.danga.com/memcached/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



  1   2   >