We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Might there be some other way to clear the core/cache folder in Cloud other than SFTP? Talk about sloooooow...

    SSH? Is this fast? I really need to learn how to properly use SSH, so if this is the answer, then I need to hit the books again. I'm a bit lost in PuTTy still.
      Frogabog- MODX Websites in Portland Oregon
      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
      Having server issues? These guys have MODX Hosting perfected - SkyToaster
    • I have it on good authority that there will be an "empty cache" function added to the individual Cloud's tools wink

      In the meantime, get the ssh domainname, username and password from the Cloud's information page. Then at a command line...
      SmallMac:Desktop sottwell$ ssh (username)@(domainname)
      (if this is the first time, it may ask you if you want to add this server to your list of servers to connect to, just say "yes")
      (username)@(domainname)'s password: (careful, there will be no indication that you are entering anything here)
      (a whole bunch of server information is displayed...)
      /paas/(username)/home $ cd www/core/cache (change directory)
      /paas/(username)/www/core/cache $ pwd (check the path)
      /home/www/core/cache
      /paas/(username)/www/core/cache $ rm -Rf * (delete everything here)
      

      I double-check the "present working directory" with the "pwd" command because that "rm -Rf *" command will promptly delete anything and everything in the present working directory that your ssh user has permissions for.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • Thank you Susan.

        Now, if I can figure all that out it means you're so awesome that you get to go eat cookies without guilt. But just once.
          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 1. Connect to the server from a command line, using your Cloud's username and domain name

          ssh [email protected]

          This will, on the first connection, produce a few lines saying something about not recognizing the host, do you want to add the host to your list of recognized hosts, (yes/no) - just type in yes here.

          2. Then it will give you a line with the connection string you just used, asking for its password. Enter the password - you won't get a *** or anything else to indicate that you are entering anything, which can be rather disconcerting the first few times you do this.

          This will produce a whole bunch of stuff telling you all about the server and the shell you have just connected to (the shell is the command line interface that lets you talk to the server). The last line will be the shell prompt, showing the path to where you are and your username with a $ where you enter stuff.

          3. While not exactly necessary, I prefer at this point to cd (change directory) to the www/core/cache/ folder. This is just to avoid unpleasant mistakes. The shell commands are very literal and unforgiving; it's quite possible to completely delete everything in your Cloud's home directory if you use the wrong command in the wrong place.

          cd www/core/cache

          4. Again not necessary, but I double check to be double sure I am doing what I mean to do. Computers do exactly what you tell them to do, not necessarily what you mean for them to do! "Present Working Directory" will respond with the folder you are now in.

          pwd

          5. Now delete everything in the core/cache/ directory.

          rm -Rf *

          rm = remove
          -R = Recursive; continue into all child folders since rm by itself will only remove files in the current folder, not other folders.

          f = don't ask me at every file if I want to remove it, just do it.

          * = everything.

          If you are more stout of heart than I am, you can, immediately after logging in, simply use one line:

          rm -Rf /home/www/core/cache/*

          You won't get anything except a new command line prompt. the ls command will list what's in the directory you're in; at this point it shouldn't show anything.


            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 3749
            • 24,544 Posts
            BTW, I'm working on a utility snippet to delete all the cache files. Hopefully, it will be out later today. I don't know if it will work on a Cloud site, though.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
            • Oh Goodie!



              woohoo! Popcorn eating guy didn't break the thread this time :~}
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 3749
                • 24,544 Posts
                I released CacheClear this afternoon (and CacheMaster yesterday). smiley
                [ed. note: BobRay last edited this post 11 years, 4 months ago.]
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                • Thank You Bob!

                  I'm trying to work with CacheMaster right now. I have the new property set created, set to yes, and selected in the system events, but the box is not showing as unchecked when I edit or create a resource.

                  I believe it works as expected when I untick the box.

                  Does this work on chunks/snippets/TV's/plugins too?
                    Frogabog- MODX Websites in Portland Oregon
                    "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                    Having server issues? These guys have MODX Hosting perfected - SkyToaster
                    • 3749
                    • 24,544 Posts
                    I've had property sets being ignored in Plugins. I think it's a cache issue.

                    Does it work when you set the default property to "Yes"?

                    It only works with Resources. It could be modified to work with elements, but it would be much more complicated and the side effects could be more severe.



                    [ed. note: BobRay last edited this post 11 years, 4 months ago.]
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                    • Nope.

                      Interestingly enough, if I duplicate a resource, the box is unticked. New resources and edit of existing still remain ticked.

                      Elements would be nice, but one would of course have to be careful. I imagine being able to work with elements without caching the site for a "session" and then running a full site clear when done, then running RefreshCache when finished.

                      RefreshCache is great, although it seems to hang at home (site start) visually on first run, and then again towards the end after refreshing. I think it finishes, but I don't get a visual indication on the page so I end up running it again just to be sure.
                        Frogabog- MODX Websites in Portland Oregon
                        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                        Having server issues? These guys have MODX Hosting perfected - SkyToaster