Hot answers tagged

1

I have found more info and directly linked with data changes (index therefore). The cache in Magento is built with tags. I will describe an example below that may show the product category listing can reflect the latest products' data without incurring huge costs on the server activity. Many blocks in Magento 2 do implement the interface \Magento\Framework\...


1

I answered a similar question about failing backends containing some debugging commands: How do I properly debug the root cause of 503 errors produced by Varnish? I always advise people to use varnishlog, because it contains valuable information about what's going on. I wrote an extensive blog post on how to use varnishlog: https://feryn.eu/blog/varnishlog-...


1

What you are observing is easily contributed by failed health probes in Varnish. The default is to consider the backend as sick if it takes 2 or more seconds to respond: backend default { .host = "/* {{ host }} */"; .port = "/* {{ port }} */"; .first_byte_timeout = 600s; .probe = { .url = "/pub/health_check....


1

yes theres a way to do this in observer: make a file called events.xml in etc folder: <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="...


1

Not sure this is the problem, but since you say it's cache related, it could be the fact that the top links block is cached and the cache does not take into account the current url. So if you don't have a cache for it, and the first page you visit is the homepage it will always create the cache containing the homepage url. You can go around this by adding ...


1

Check this article it might help you http://www.jyotiranjan.in/blog/refresh-magento-cache-programmatically/


1

If we want to clear our example_id cache, we can either do it simply from the admin panel in Cache Storage Management and then refresh “Blocks HTML output” or do it programmatically using remove($cacheId) or clean(array($cacheTag)). Mage::app()->removeCache($id);


1

create your own cache type by declaring the following in your config.xml <global> <cache> <types> <custom translate="label,description" module="module"> <label>Custom Cache</label> <description>This is my custom cacge</description> ...


1

All the ones you mention are worth being looked at. I may have some more for you to take a look: in pub folder, it is useful to remove files that are not meant to be there and pub is often misused. Right away, find files that are larger than 5M is good place to start. They may be legitimate files. However, by doing just this, I once found an image that was ...


1

php bin/magento setup:static-content:deploy -f This should do it ! UPDATE: php bin/magento setup:upgrade php setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento indexer:reindex php bin/magento cache:clean php bin/magento cache:flush You should also be aware that due to Linux file permissions sometimes you need to give permission ...


1

Generally, we don't need to run every command all the time. Sometimes it only requires cache: flush but extension creation or enabling any extension needs every command. Not an issue if you're running these command unnecessarily except changing permission, but It's wasting of time, and mainly if the site is live, then it stops working until commands executed....


Only top voted, non community-wiki answers of a minimum length are eligible