Hot answers tagged

2

Here you can find an interesting benchmarking between Redis (remote or local) and Python Disk caching. The answer from Didier Spezia is good enough to understand the results. https://stackoverflow.com/a/12871072/8520235 Enough RAM and disk caching are always better solutions for reasonable amounts of data. Any local, not to say remote, Redis solution ...


1

This sounds like asset transforms are consuming all of the space in the storage directory. Asset transforms take the original asset from the S3 bucket and transform it (resize, crop etc.) for use in various pages on the site. However, while the newly-transformed asset gets saved to the S3 bucket, it's also cached on the local server. With a big enough site ...


1

It was a User permissions problem. I didn't realize each folder has its own permissions per user group.


1

will they experience a slow page load while the cache is being regenerated? That one. After a cached item is expired, the next person to request that item will cause it to regenerate and take any performance penalty that involves.


1

The other error Im getting is dirname: command not found. I was able to solve this issue by just manually setting the DIR variable in the script I needed to use. There is probably a better way....


1

Sounds like a custom plugin or module would work for you here, allowing you to hook into the entry after save event. use craft\elements\Entry; use craft\events\ModelEvent; use yii\base\Event; Event::on( Entry::class, Entry::EVENT_AFTER_SAVE, function(ModelEvent $event) { $entry = $event->sender; if (!$entry->getIsDraft()) {...


1

The CSRF token is likely expiring. Since pages are cached with Blitz, you must use some strategy to ensure that a fresh CSRF token is loaded into the page on each page that is statically served. The simplest way to do this is to use the Dynamic Content feature in Blitz, specifically craft.blitz.csrfInput(). <form method="post"> {{ craft....


1

It looks like your approach is working rather well, so I'll assume you are simply asking for an alternative approach. To make 1 AJAX request rather than the 80 or so that the page is currently making, I would use Blitz's dynamic content feature to load all of the products in one single template. In that template you can check whether the user is logged in, ...


1

Screenshot looks like FE, not BE. This happens when you use {% js on load %} or {% js on ready %} For now I switched to {% js %} and wrapped my script with jQuery(function ($) { ... })


1

If any of your image transforms have not previously been processed they will make a call to /cpresources/... To prevent this, generate all your transforms before page load with the generateTransformsBeforePageLoad config setting: 'generateTransformsBeforePageLoad' => true


1

Is there a Craft recommended approach to this issue please? The simplest solution would be to update to Craft 3.5+ Template cache data went from being stored in the database to the file system, so this won't be an issue for you anymore.


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