Jump to content

Disable caching back office


Neheri

Recommended Posts

Hello,

I have a problem with back office: prestashop caches pretty much everything, even when cache is disabled, and when I try to edit something & save, presta shows me results of the previous "cached" state. Example: Smart cache for css changed from 'No' to 'Yes' clicked save and after refresh I see 'No'. However if I ctrl+5 I see valid 'Yes' state. This causes problems with editing products, or even managing modules. To see if something is enabled or even exist I don't have to simply open the right menu in back office. Sometimes I have to clear browser cache. 

It happens on every web browser. I am using SSL. Didn't have such troubles on the beginning. Not using any cache system, only smarty. I think its connected to them. Maybe someone knows how to disable cache for back office? I would appreciate any suggestion.

regards

  • Like 1
Link to comment
Share on other sites

Has somebody an idea how can I disable cache? In performance tab next to 'cache' I click 'No' and save, sometimes 5 times, then ctrl+f5 'No' & save again, the status is disabled, however presta is still caching everything. I cannot edit files because If I do so presta doesn't see any changes, I have to force compile and delete 'cache' folders and even this not always work. Found smarty in ps_configuration set to 0. Nothing works. Funny thing is that even If I delete FrontController.php for e.g. presashop works anyway :D 
Anybody has any ideas how to disable caching backoffice? I would like presta to not have cached values of settings but to always read them before display.

I would be grateful if somebody has any idea, I am at very end development stage of shop but It's hard to move forward if I must refresh site 20x before I can see what changed when I replaced any files. 

Link to comment
Share on other sites

My hosting surely will do nothing. What is varnish some module?

 

 

Please help what can I do to change settings click save and see what have changed????

 

my feeling is this has nothing to do with PrestaShop but an underlying server cache implementation.  I still advise contacting them.

Link to comment
Share on other sites

Its polish company home.pl and they are known for not caring about what users say. 

I can see change when I set file permissions to /cache as 000. Or when I delete them. Shouldn't smarty compile all files after this option is set in back office? 

EDIT: I've enabled cache file system on the bottom and set manually PS_CACHEFS_DIRECTORY_DEPTH = 0. Now it works somehow, at least presta notice when I deleted FrontController.php after first refresh. However, after I uploaded it back and refreshed: 

 

 

EDIT2: I've noticed that after I delete /cache/class_index.php or set its permissions to 000 I see the changes I made with files or settings. Maybe I can edit function responsible for force compile to delete this file? 

EDIT3: Ok I found the solution, it was applied in the last commit of prestashop. There was problem with PrestashopAutoLoad.php class. Shop updated and everything works.

Edited by Neheri (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Thank you all mates for your help but as I said solution to my problems was updating prestashop to the newest version, everything is fine now, even with cloudflare enabled I see changes just after I click save. Thanks for your time though.

Link to comment
Share on other sites

  • 1 year later...

Hi,

 

I've been having the same issue with BO. My site is hosted on a VPS and the problem appears only after two or three weeks of the server running. Clearing cache from within the BO doesn't seem to be able to fix the problem, the reboot normally does fix it. I don't remember if I tried to restart memcached during the problem I must try to do that next time it happens.

 

I've had this problem since I migrated my shop to prestashop (2 months ago). There is no reverse proxy (varnish, squid) in a front of the apache server.

 

I will also try to update to the latest PS as the new update is now available. 

 

Robert

Link to comment
Share on other sites

  • 10 months later...

Autourdupc, solution from linked post not works for me. After changes in classes/controller/AdminController.php nothing changed.

It's strange beacause I have this problem just from few days. I didn't change anything last time in PS cache settings. But I have enabled caching options.

 

What's important. I see changed content (products description) on frontend, also (of course ;) ) in database in table ps_products_lang.

But still in backoffice I see old descrption. Even after refreshing this backoffice site in every way. Also in different browser also even on different device! Still old product desription in back office.

 

I use Prestashop 1.6.0.14 version.

 

Any ideas? What should I do?

Link to comment
Share on other sites

Thank you, but exactly my favourite browser is Firefox ;)
But... but what's interesting... I didn't change anything and now problem dissapeard. After making changes in products I see right now after it changes also in back office.

Maybe server administrator change something for a while... I don't understand. We will see later.

Link to comment
Share on other sites

note: PrestaShop does 'not' cache in back office.  The cache parms in performance are only for front office.  

 

if you have cache issues,  it's 99% hosting, i.e. varnish cache so contact them.

 

This from my experience writing BoZoom back office performance module, maybe something changed but I  don't think so.

Link to comment
Share on other sites

Cache is a very loosely used term, since it can apply to smarty compile cache, php compile cache (like opcache), data caching like APC or MemCache, Cloudflare (file caching)

 

So depending on the context of Cache, the back office will most certainly use it. 

 

Specifically, if you are talking about Caching options in the performance page in the back office, like APC, memcache, file system... That will most certainly affect the back office if you enable it.  The reason is that type of caching is done within each of the Core Class files (Customer, Address etc...) and the Core class does not perform any check to know if it is operating in the back or front office.

  • Like 1
Link to comment
Share on other sites

El Patron, I asked my VPS administrator for info if something has changed last time on server etc. Generally nopthing has changed. Hu suggested that it could be transparent proxy-cache on internet provider side. I'm using Orange DSL. Maybe, but as I remember I thought about that and I checked values in back office on my mobile. But now I'm not sure if that was on WiFi or mobile connection. What else... at home last time I also totally can't access to my carrier website. Only using my cable internet connection. On every other connection (from exaple hotspot from my mobile) it works. Maybe it's the issue.

 

bellini13, thank your for detailed describing situatiion. It could be reason, but not in my case, because from longer time I didn't change nothing in this cache options.

Link to comment
Share on other sites

  • 4 months later...
  • 5 months later...

for prestashop 1.7.2.4, i moved by code from windows10 to production server, i did all required changes, parameters.php, database table changes like shop_url etc. still i got error while login in to admin panel, database access denied for username root@localhost, this was not even the setting on the server. and website was not accessible.

Only thing worked for me was giving write permission on app/cache folder on the server. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...