Joomla Cache creates lots of cache files; how to manage cache properly. - caching

I am using Joomal 3.3. and its hosted on the Godaddy and Godaddy's account file limit is 2500000. My Joomla is creating large amount cache files which goes over the limit. The website is a calendar driven and has lots of events, quires based on categories, etc. I have been cleaning cache manually. First, I would like to know why there are lots of cache files created and second I would appreciate any suggestion/solution that will resolve this issue permanently. Is there any plugin that would automatically clear the cache like every two days which I should I consider?

The problem that you have is the expired cache that should be deleted, but is not. You should purge the expired cache automatically by adding the following to your cron:
wget http://yourwebsite.com/cli/garbagecron.php
The above cron should preferably run on a daily basis. If you don't know how to add it, then you can always ask your host (GoDaddy) to do it for you.

Related

Invalidating only modified files from Cloudflare's cache

I'm running Cloudflare in front of a web application, and often need to manually purge the Cloudflare cache after pushing in order to test changes I've made. Since I'm currently using GitHub Actions for my CI/CD pipeline, I could stop doing this manually altogether and use one of the many third-party Actions to purge the cache after every push, but this seems like it would reduce the efficacy of the cache and cause users to feel the impact.
Is there a (presumably programmatic) way to purge the Cloudflare cache for modified files only, either using GitHub Actions or otherwise? It seems that this should be technically feasible since Git already knows which files have been modified and Cloudflare does allow cache invalidation via URLs on the free tier (although not with wildcards).

Serve static assets with an efficient cache policy - error in PHP website

How to manage to Serve static assets with an efficient cache policy and minimize main-thread work.
Serve static assets with an efficient cache policy - this is a suggestion that assets should have at least one month cache set on them (usually done via .htaccess).
It looks like you have already done this for everything you can control as the items listed are external assets you cannot set the cache policy on.
If you have done it for all your own resources (from your domain) then do not worry.
minimise main-thread work - this means that your site is using a LOT of JavaScript or performing a lot of calculations on page load.
The only way to improve this is to remove unnecessary JS and optimise anything that is remaining.
My guess is you are using lots of plugins / libraries to do simple things on the site that could more easily be achieved through other methods.
Post the URL of your site and I will improve this answer to give more relevant answers that may help you and others.
Work around for efficient caching
One way you could fix this issue (but you need to know what you are doing) is to download the script in question to your server every night via a cron job and serve it from your server instead.
That way you can set the cache time - however you need to make sure you do cache busting on the script each time you download a different version (by comparing the previous file and the new file and checking for changes) so you don't break functionality.
As you can imagine, this technique is only used in extreme circumstances where you can justify the need to control the cache policy due to the massively increased complexity and potential for problems.

demandware site updates not instant

My company has recently begun using demandware, however we are finding it slightly odd that instant site updates are not possible, whether through a cache clear or server updates, at the moment our servers update every 24 hours, so effectively any changes we make one day won't go live until the following day. In demandware is there anything that can be done so we can instantly see new updates to our site or perhaps a server update occurring every hour?
Thank you
What is that change that you want to be instant as update on production?
Why it should be instant, even if the site is over heavy load at the moment?
There are various ways you can achieve quicker updates (remote includes with different caching, integration feeds targeted on production, cache segmentation, etc.), still I need more details about what exactly you are trying to do to suggest you appropriate solution.
Also your question is better suited in Demandware XChange portal, not in Stack Overflow, as this is site for programming, and your question is not a programming one.
Unfortunately, there is no way to make instant changes on Demandware. you can however makes changes that will be reflected on the site within 15 mintues. To do this, you will need to be logged in to production.
There are typically three instances that you can make changes; development, staging and production. If you are seeing the changes come through after 24 hours then you are most certainly logged in to the staging instance, where changes are replicated over to production at a designated time.
What you'll need to do is login to production and make the required update. Then, clear your site cache to make the change visible on the live site. You will then need to wait on average 15 minutes for the data centres to dump their cache and serve a new copy of the site.
To clear the site cache:
1) Navigate to Administration > Manage Sites
2) Select the relevant brand/region
3) Click the Cache tab
4) Click the first "Invalidate" button
For clearing cache..
You need to go to Administration -> Manage Sites -> Select the site -> Click Cache tab and then click on Invalidate Cache.
..
This initialises the cache invalidation process which usually takes some time but not an entire day.
..
Please check if there are any other caching mechanisms added for your sites.
Usually, Invalidating cache works just fine.

Magento - Saving products is very slow

When I save a product in the Magento admin it is extremely slow. It can take around a minute for the product to save.
I found some information in Google that suggested this would be related to the indexing. I changed the indexing mode so it only updates manually but the problem persists.
For some reason if I select the product and use the 'Update Attributes' option it saves in a few seconds but updating an individual product is painfully slow.
Any ideas?
Inadequate system resources and need for MySQL optimization. Find a hosting provider that provides servers tuned for running Magento. 1 minute sounds about right for a shared server that's being choked off by settings that ensure that resources are being shared out equally among all the users on the system.
Generally in Magento to upload products use of data import/export is recommended.
Magento Backend is slow and you need a more powerful resource/server to process things faster.
Also as stated in above post you need to set indexing mode to manual which you have already done.
Also more number of attributes means higher sql query load so check for attributes sets etc.
Products saved fine until recently and I am on a semi dedicated server so this wasn't the problem.
However, I have now found the cause of the problem. It was an extension from channelunity.com. I have disabled that and saving products is back to taking a few seconds :)
I have contacted the extensions developer so hopefully they provide a fix.

Updating cache on update of database table

I am using AppFabric to handle the caching capabilities of my website. I would like the
products cache to be updated once there has been a change within the products table
within my database. I read about implementing a read-through but from reading about I
found:
Read: Called when a cache client requests a cached item that does not currently exist in the associated cache.
This doesn't seem like it will solve my problem as I'd like the products cache to be
updated once a change to the table has been discovered, it won't necessarily not exist
in the cache in the first place. Is there any way I can do this using AppFabric
capabilities?
Basically, you just want to have a SqlCacheDependency mechanism. In the past, it was very usefull for In Memory Cache.
However, there is no support within AppFabric caching for the SqlCacheDependency mechanism (or in fact for any kind of dependency). You have to build your own ...
In addition, With a read-through provider, the cache detects the missing item and calls the provider to perform the data load. If your add your item with an expiration of 30 minutes, the provider will never not try to reload it before its expiration.
Eventually, you can try to update the cache with a Write-Behind provider. It will update periodically you database.

Resources