-
- 128 Posts
What is the fastest way to work in ModX if you are using a outside editor and static resources.
Do I need to run a local ModX with MAMP and build my database offline?
Right now hitting the server with static resources. On Save - Upload. Then its a bunch of refreshes and the resource isn't changed. Do I have to clear cache everytime? I turned all cache off in modx system settings and it didn't seem to have any impact.
You shouldn't need to clear the cache after editing a file for a static resource. The only part of the resource that's cached is the path to the file (which is saved in the content field).
-
- 128 Posts
Thats weird. because I am not getting anything to refresh. I even browsed in Private Mode with Cache Disabled. So my browser isn't caching files.
Does this work for any static resource? because i made a chunk, put javascript in it.
opened it up in a FTP and changed it via the static resource.
save a JS file as a static resource with - alert("1");
refresh.
save the same JS file in a FTP or on a local computer and upload it. alert("2");
page doesn't update. same alert.
in fact, i can remember that a year or two ago when static resource first came out i had the same issue with them then that i have now. that they are slower than just alt tabbing into a browser and pasting in a file.
Can anyone confirm this is suppose to be instant? is it a server setting? any suggestions?
-
- 128 Posts
ok I read @suikerzout's post and I am back to what i was asking before. I was correct to say that the static resource won't change until the cache changes. meaning if you update a static file in a ftp, you can refresh all day, but until you open the manager and clear cache or navigate and save that file in the manager it won't update?
Is there a way to update the cache from a command line? ssh or some other way so i don't have to log into modx to rebuild the cache?
edit: got Mamp 3 going. downloaded my database from the web and can do it locally, and at first I was having the same problem of cache issues. but I created a static resource in modx's manager and it saved it as _www:wheel for chown, and that resource updates realtime with no cache changes... so i just did a chown on my assets folder and we'll see how it goes.
edit -2: ElementHelper is nice. Thank you for that. I will be using it or something similar from now on. Can't see not using it. This was one of my big issues with creating tv's was how slow it was. with this I can hammer through a json file and update them super quick.
Thanks!
[ed. note: zurie last edited this post 9 years, 10 months ago.]
-
- 247 Posts
Any recent developments with static resources? I seem to be having a similar issue with a TV which uses a static file. Changing the file externally has no effect at the front end, even though the changes appear in the page's TV input.
-
- 24,544 Posts
Is the page cached? That sounds like a cache issue.