System - VmCache by

Please post your questions and problems with any of our extensions which you are using

System - VmCache by

Postby » Wed Feb 21, 2018 8:15 pm

Hi Stan,

I am thinking to use your system cache.
I figured out that the site speed is increasing after the first visit of a page. So I thought a cron job might be a good idea.

Could you tell me an example how to make a script that visits every url. (I will take all my urls from xml module I have (xamp))

Kind regards
Posts: 11
Joined: Thu Oct 10, 2013 4:57 pm

Re: System - VmCache by

Postby » Sat Feb 24, 2018 8:00 pm

Hi again

I read your article about making a script and visit all pages taken from sitemap xml

I think the problem now is that all pages are now cached but only for desktop.
How can i crawl the site again but with mobile view?

I found the script on github
Posts: 11
Joined: Thu Oct 10, 2013 4:57 pm

Re: System - VmCache by

Postby admin » Thu Mar 01, 2018 1:45 pm

hello, to create cache for the mobiles, your fetcher would need to imitate mobile visit. generally it's not really recommended to show different content on the same URL for desktop vs mobile (usually responsive CSS's are made to run on both without the device detection). if your site uses 2 domains for desktop vs mobile that would be something else and you should be able to create those caches easily.

if you are using curl from CLI to create the cache from the sitemap you may want to alter the user agent to iOS's browsers so that it imitates a mobile visit: ... with-curl/

if you are using php based curl to visit all URLs you may want to adjust curl per php config:

the vmcache system in the very latest OPC version does not use joomla's cache system any more, but rather uses direct file accesses. the main reason is that the joomla cache still uses a blocking "sleep" command which slows down your site when using joomla's cache.

to tune the cache to the maximum performance you may want to mount your cache directory as tmpf with 16gb space as far as your server got plenty of free RAM. after the 16gb it should start swapping to hdd.

also note, that the plugin has no system to clear the cache and it's expected from you to clear it daily as needed. you can clear it with an extension like this:

upon any backend changes, or preferably with a cron job that deletes all files older than X hours/days.

i've seen system creating up to 40gb of cache data daily - if this is your case you may want to consider not to use it at all, since searching the cache index within the directory with tens of thousands of files is usually much slower than not using the cache at all (same applies for all types of caches in VM, Joomla, Mysql or else)

also you must note that using the cache can be dangerous in matters of XSS vulnerabilities that are found almost in every release of Joomla or Virtuemart. if the attacker can poison the cache with their own code, the cache would get shown to the other customers thus infecting them with malware or else - this must be minded upon using any cache solution and you should regularly update all extensions and do a few security audits in this matter.

for the above reasons, the ideal usage of this cache is when you do TV campaings where you expect a huge number of visitors at peak times that your server would normally not be able to handle.

either way, getting a server like this:

would always make your site faster when all caches are disabled since the IO speed on NVME or RAM disks is always faster compared to overhead caused by cache systems.

best regards, stan
Site Admin
Posts: 2654
Joined: Wed Jan 06, 2010 11:43 pm

Return to VirtueMart and Joomla Extensions (free or paid)