Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

A Couple Questions about ?flush=1


Go to End


5 Posts   922 Views

Avatar
juneallison

Community Member, 110 Posts

4 August 2011 at 7:35am

Hi,

As I have been developing a site I've been using ?flush=1 often, no problem.

Although in terms of a live site what does this mean? I'm not really sure I'm clear on why flush is needed the first place (kind of). Any visitor to the website is not going to use ?flush=1. If I run ?flush=all on a front-end page does that mean all front-end changes have been pushed through (in some sense)?

Another interesting thing came up when I let someone else enter blog posts. They entered them via the front-end but then didn't see them in the admin interface. I'm guessing they need to use ?flush=1 in the admin to see these new posts. Would it be wise to set up the site to automatically flush or should I just instruct anyone editing the site to flush the admin when making changes via the front-end? And how do I know visitors to the website are seeing the most recent changes?

Any explanations or thoughts on this would be great.

Thanks!

Avatar
MarcusDalgren

Community Member, 288 Posts

4 August 2011 at 9:42am

You shouldn't need to flush as much as you're currently doing. Generally you just need to flush if you're doing big changes and usually it should pick up on the changes anyway. If I recall correctly you have to flush if you make a change in an include-file for a template, if you add new classes (often needs dev/build as well) and that should pretty much be it. I use only flush=all since that flushes everything.

On a live site you shouldn't need to run the flush command except in very exceptional cases since a normal user can't run it at all when the site is in live mode. I haven't tried the frontend features of the blog module but they shouldn't have to flush the backend just to see the changes. Keep in mind though that if they have the backend open in a separate tab and are writing posts via the frontend interface then they have to reload the backend to see the posts. They shouldn't have to flush though.

Avatar
juneallison

Community Member, 110 Posts

4 August 2011 at 9:48am

Smurkas - Thanks for the explanation! That is helpful.

I didn't even think about the separate tab thing. That was most likely the situation.

Thanks again!

Avatar
MarcusDalgren

Community Member, 288 Posts

4 August 2011 at 9:51am

No problem!

It's tricky in the beginning to know when you have to run flush and when you have to do a dev/build. I usually always do both when I'm developing so I run dev/build?flush=all when I need to since that both updates the database and flushes everything.

Avatar
juneallison

Community Member, 110 Posts

4 August 2011 at 9:56am

That seems very efficient! I think I may start using your dev/build?flush=all technique. Thanks!