Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-12-15 21:23:50

Myusername
Member
Registered: 2019-12-12
Posts: 34

How to disable cache?

I have been using the forum a lot lately, I hope you have no problem.

Anyway, I researched how I could disable caching, but I didn’t find anything that worked. I’m making some changes to my theme, but the cache won’t let me see the changes live. How can I disable it?

Offline

#2 2019-12-15 21:40:33

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,662
Website

Re: How to disable cache?

Hi, it may not be the cache that’s the problem.

If you have switched themes in Presentation › Sections check if it lists two themes for those sections. If so, you need to the site status to be in “testing/debugging” mode to see those changes. This is a mechanism for previewing your theme changes without them being publicly visible.

Alternatively, edit that section and set the theme in the edit section details pane. That should switch to the new theme permanently.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2019-12-15 22:32:32

Myusername
Member
Registered: 2019-12-12
Posts: 34

Re: How to disable cache?

jakob wrote #320558:

Hi, it may not be the cache that’s the problem.

If you have switched themes in Presentation › Sections check if it lists two themes for those sections. If so, you need to the site status to be in “testing/debugging” mode to see those changes. This is a mechanism for previewing your theme changes without them being publicly visible.

Alternatively, edit that section and set the theme in the edit section details pane. That should switch to the new theme permanently.

Already in test mode, I changed to debug but the result is the same. The changes do not happen.

Apparently it is in the cache, when I enter through an anonymous browser tab, as changes happen. When clean browser data also works. Do you know any method or plugin to disable cache?

Last edited by Myusername (2019-12-15 22:38:08)

Offline

#4 2019-12-16 00:04:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,962
Website

Re: How to disable cache?

I’m a little confused. Textpattern doesn’t cache pages. Your browser might.

But, as jakob says, this may be a Themes thing. Presuming you’re running Txp 4.7.3, we have introduced a dev/live workflow that allows you to preview your theme while keeping your public (logged-out) theme the same, so site visitors are not affected by your tinkering.

First question: do you have more than one theme installed? Even a second one that may be a clone of your first that you’re working on? If so, check your Presentation->Sections panel. If you see two themes assigned to the same section – one greyed out and one not – then the greyed-out one is what public visitors see, and the non-greyed-out one is the one you’ve overridden – and is what you see while you’re logged in. This allows you to test changes before making them live for public visitors.

Second question: are you developing the theme via the Textpattern interface (Pages/Forms/Styles panels that affect the database directly) or are you making changes on the disk copy (if you’ve made one)? Textpattern only renders the database templates to you and visitors. The disk is just a backup.

There is a beta plugin, etc_flat, available which allows your disk copy to be viewed directly as soon as it’s saved.

Does any of that help?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2019-12-16 01:01:30

Myusername
Member
Registered: 2019-12-12
Posts: 34

Re: How to disable cache?

Bloke wrote #320561:

First question: do you have more than one theme installed?

No, I only have one theme in my textpattern. The rest excludes.

Second question: are you developing the theme via the Textpattern interface[?]

Yes, I’m developing it through Textpattern’s interface, and yet, I always make sure to export to disk.

I’m a little confused. Textpattern doesn’t cache pages. Your browser might.

Yes, I am aware of that. However, I thought maybe there was a plugin that would prevent the browser from caching, or something, because even CSS files are cached.

While developing in WP there were plugins that said to disable caching. I have no experience with this to say exactly what they were doing, so I can’t give you any further details.

I’ll take a look at my browser settings and the plugin you said. Thanks for the answer

Offline

#6 2019-12-16 05:58:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,537
Website

Re: How to disable cache?

You could use htaccess. Just change the access values.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#7 2019-12-16 07:12:22

Myusername
Member
Registered: 2019-12-12
Posts: 34

Re: How to disable cache?

colak wrote #320563:

You could use htaccess. Just change the access values.

Yes, that works. As always learning from the forum staff. Thanks

Offline

#8 2019-12-16 08:11:02

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,829
Website

Re: How to disable cache?

Of course the htaccess disables caching for every visitor, which is not a good thing. Learn to force reload pages in your browser? On e.g macOS, Safari and Chrome: Cmd-Opt R; Firefox: Cmd-shift R. On mobile devices (iOS and Android), it is much harder, sadly.

Offline

#9 2019-12-16 11:51:13

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 185
Website

Re: How to disable cache?

How are you refreshing the cache? Does ^F5 ([Ctrl]+[F5]) of your browser not return the new look?

Offline

#10 2019-12-16 19:18:10

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,682

Re: How to disable cache?

Many (most?) browsers with web inspectors will allow you to disable caching. For example, in Mac/Safari there’s an icon on the Network tab:

Offline

Board footer

Powered by FluxBB