Jump to:

22976 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » A Couple Questions about ?flush=1

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

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

Page: 1
Go to End
Author Topic: 501 Views
  • juneallison
    Avatar
    Community Member
    108 Posts

    A Couple Questions about ?flush=1 Link to this post

    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!

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: A Couple Questions about ?flush=1 Link to this post

    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.

  • juneallison
    Avatar
    Community Member
    108 Posts

    Re: A Couple Questions about ?flush=1 Link to this post

    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!

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: A Couple Questions about ?flush=1 Link to this post

    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.

  • juneallison
    Avatar
    Community Member
    108 Posts

    Re: A Couple Questions about ?flush=1 Link to this post

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

    501 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.