-
- 353 Posts
Is there a way to bulk cache hundreds of resources without opening every link to push it into cache? I know I can bulk uncache but can I bulk cache?
Thanks
-
- 24,544 Posts
-
- 353 Posts
Thanks...jut ran it there on 300+ resources and it finished after 4 seconds? Is CacheMaster conflicting with it I wonder?
-
- 24,544 Posts
No, it shouldn't. You can see if it worked by looking in the core/cache directory.
-
- 24,544 Posts
Look in core/cache/resource/web/resources. Each file is a cached resource. Either there will be a whole lot of resources there or there won't (assuming that the resources are set as cacheable).
-
- 353 Posts
Hi Bob,
Thanks. Yes the resources are all checked as cacheable. If I run RefreshCache it neither adds nor deletes any files. If I have created resources 1 thru 100 in Mode Revo should running RefreshCache create these in core/cache/resource/web/resources as ..core/cache/resource/web/resources/1 ....core/cache/resource/web/resources/2........upto core/cache/resource/web/resources/100?
Is that the idea? The fact that RefreshCache runs for 2 to 3 seconds (as opposed to 15 minutes as alluded to in docs) when the core/cache/resource/web/resources folder is entirely empty suggests there's some conflict with the functionality.
I have a .htpasswd on the public_html root folder but I doubt that matters. Would APC on the server affect it. It's the modxcloud server setup
I remember months back I ran RefreshCache on another project and it did process for 10-15 minutes. Not quite sure whats causing it to run for under 3 seconds this time though. Server config maybe?
Thanks
[ed. note: howster last edited this post 9 years, 3 months ago.]
-
- 24,544 Posts
I've never tried it on Cloud, but I have observed that Cloud has a very fast server. The numbers in the cache file names are the IDs of the resources, so it would be unlikely that they'd run from 1 to 100.
If the cacheable resources are already cached, RefreshCache will run much faster. It does the equivalent of visiting every page and those pages will load much faster if they are already in the cache. APC could definitely make it faster yet. Even if you deleted all files in the MODX resource cache, they might still be in the APC cache.
The bottom line is if you delete all the files in the resource cache, then run RefreshCache, they should all reappear in the resource cache. If they do, RefreshCache is working.
-
- 353 Posts
That extra won't work for me unfortunately so. Just doesn't create the cache files you stated. I will report back if I find the solution. Thanks
-
- 24,544 Posts
Possibly cURL is misconfigured or disabled, or the host is blocking multiple requests from the same location as a perceived DOS attack.