Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: A tale of two Speedy’s

Status Resolved
Add-on / Version Speedy 1.5 (both)
Severity
EE Version 5.42 and 6.16

Paul Larson

Jan 28, 2022

I have two sites w/ Speedy, each uses a very similar (or identical) {exp:speedy:fragment} setup. One clears as I expect, the other does not.

I’ll post a private video with a 5 minute demo.

Speedy CACHES properly, and speeds up the site - so no complaints there. I just can’t get the EE5 site to clear as needed.

The working site is:
CentOS Linux release 7.8.2003
PHP Version 7.4.27
FPM/FastCGI
config.php: $config[‘speedy_break_async’] = ‘no’;

The non-working site is:
Ubuntu 20.04.3 LTS
PHP Version 7.4.27
FPM/FastCGI
config.php: $config[‘speedy_break_async’] = ‘no’;

#1

Paul Larson

Jan 28, 2022

Comment has been marked private.

#2

BoldMinded (Brian)

Jan 28, 2022

If one is clearing and one is not, then the add-on functionally is working, e.g. no known or obvious bugs. There is something _very_ specific going on for the site that is not clearing, and since you’re using file it leads me to believe that it has to be a permission error and it’s unable to delete the cache file. The next step is to debug the CacheBreaker.php->_breakEntryCache() function to see if anything is going wrong in that function. If you can var_dump, step debug, or log that function it might reveal something. Have you checked your php error logs? B/c it will try to log an error if it exists. At the bottom of that function is this:

try {
            if (count($clear_tags)) {
                $this->clearTags($clear_tags);
            }

            if (count($clear_items)) {
                $this->clearItems($clear_items);
            }

            if (count($refresh_items)) {
                $this->refreshItems($refresh_items);
            }
        } catch (\Exception $exception) {
            error_log($exception->getMessage());
        }

 

#3

Paul Larson

Jan 28, 2022

Interesting. On channels that use Speedy, I get this PHP error on entry save.

3753500#0: *72042 FastCGI sent in stderr: “PHP message: The key contains invalid characters” while reading response header from upstream, client: 96.93.229.17, server: http://www.mydomain.com, request: “POST /admin.php?/cp/publish/edit/entry/302 HTTP/2.0”, upstream: “fastcgi://unix:/var/www/vhosts/system/mydomain.com/php-fpm.sock:

On non-Speedy channels, no such error upon save.

This is at least something. I’m going to start here.

#4

Paul Larson

Jan 28, 2022

In the Speedy codebase

system/user/addons/speedy/Service/CacheItem.php:108:    throw new \InvalidArgumentException(‘The key contains invalid characters.’);

At the risk of taking that too literally, are any of these keys… wacky in appearance?

#5

Paul Larson

Jan 28, 2022

I think I’m being brain dead. Hang on. =)

#6

Paul Larson

Jan 28, 2022

{exp:speedy:fragment ttl=“0” global=“no” key=”{url_title}-entry-contents”}

That should be allowed, right? Or would {url_title} be forbidden within a key?

#7

BoldMinded (Brian)

Jan 28, 2022

{url_title}, if unparsed, is forbidden in a key. The following characters are not allowed to be saved as a key, especially when it’s a static file. Could cause havoc.

{}()|\@:

Login to reply