Yii Framework Forum: Model Caching Issue - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Model Caching Issue Phantom model stuck in a cache somewhere, inexplicable behavior. Rate Topic: -----

#1 User is offline   glyph 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 20-April 12
  • Location:Michigan, USA

Posted 02 May 2013 - 04:05 PM

Hi everyone. I'm having a weird issue with one of my models being cached somehow on a production server. I'm not experiencing this problem on a development server copy of the same app.

At first I noticed this because I was having a problem with cGridView search property being undefined, but since discovered that the Samples model in my app is not being updated. I would add the property and publish it to the prod server but the property still wouldn't exist.

After disabling my memcache and resetting the mysql query cache, and making sure there are no other apache cache extensions, I've narrowed it down to an application level cache issue by doing the following:

In my production models folder, I can delete any model file, and the web service returns the expected model not found error. Not so with my Samples model. I delete Samples.php, and the model continues to serve new views with new parameters, but still using this old version of the model.

For example:
Delete Models/Devices.php
Request https://mioncoseq.pa...u/devices/index (private)
error - include(Devices.php): failed to open stream: No such file or directory
Put Devices.php back, works like normal.

Do the same thing with Models/Samples.php and it keeps right on serving the old version, even if the file doesn't exist on the server.

I've deleted everything under assets/ and disabled caching in config/main.php, even restarted services and the whole server. Perhaps there is some other caching in Yii I'm not aware of? Anyone experienced this before?

Thanks!
-------------------------------------------------
Glyph Imaging and Data Services
0

#2 User is offline   glyph 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 20-April 12
  • Location:Michigan, USA

Posted 02 May 2013 - 04:15 PM

Just figured out what the problem was. There was a Samples.php file in the Document Root of the application. How this actually functioned in the normal Yii execution chain of the app is beyond me. But it did, and I deleted it and now stuff works like normal. Thanks!
-------------------------------------------------
Glyph Imaging and Data Services
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users