Question

a few weeks ago I discovered, that an code update didn' t take effect. Reason was that I was using require_once(). It seems, that *_once caches the file into some kind of storage.

I' ve switched to just require() as a quick solution, but now I' ve run into a situation where require_once() is the only option.

The file might change at some point in time (modified by an backend) and I wonder how long does it take to update the cache?

Or am I just experiencing some strange behaviour?

Was it helpful?

Solution

I don't think there's such a cache on *_once() functions. Maybe it's another thing like memcache or APC that's keeping an outdated version of your file, but this is quite a strange behavior anyway.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top