Publisher is EE6 compatible, but it does not support the Fluid field. 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: Speedy won’t create any caches

Status Client Wait
Add-on / Version Speedy 1.3.2
Severity
EE Version 6.1.5

Aasun Eble

Oct 27, 2021

New installation of Speedy on a new site in dev..  Speedy is installed, license (from EE addons) validated..  Cache type set to file.  Just attempting the first super basic tag pair:


{exp:speedy:fragment key="{segment_2}_vendor_team”}
  .... stuff in here to be cached…
{/exp:speedy:fragment}

No caching is done (I can tell because my page takes 7 seconds to load with this “stuff to be cached”.  And if I take it out, the page loads in under 1 second.  Even with Speedy, no change in load performance, and I don’t see any speedy cache files being created on the filesystem.  I also have tag caching enabled in a different area of this template (the speedy tag is outside the exp:channel:entries tag pair on this page), and that is working. So, I know caching is working on the site.

This is EE 6.1.5, PHP 8.0.12, and this is also a MSM (multi-site).

#1

BoldMinded (Brian)

Oct 27, 2021

Hi Aasun. What does your config file look like? Do you have $config[‘speedy_enabled’] = ‘yes’; set? Is the cache folder writable? I’m about 99.99% certain this isn’t a bug, but a configuration or setup issue, so I’ll need more information about your environment, and more details on what you’ve done so far to debug the issue on your side.

#2

Aasun Eble

Oct 27, 2021

I didn’t have
$config[‘speedy_enabled’] = ‘yes’;
in the config file.  I added that.  No difference. (though, in the Speedy Overview in the CP, it now has “Default” next to Filesystem after I added that).

I did check to make sure the cache folder was writable.  And, I also have Bloqs on this site with caching enabled, and bloqs caches are writing fine.. as are EE tag caches.

When I first installed speedy and set up the fragment tag pair, I saw that the cache/speedy directory was created.. But, nothing was inside that directory.  So, I’ve created default_site/ in there.  and local/ in default_site/ and checked their permissions.

I’ve simplified my speedy fragment tag pair to not have any key or tag, or other parameters, to just use default values for prelim testing.. 

.... Ok.  I just got it working. . I turned on debugging and saw that there was an error from speedy saying that my key needed alphanumeric characters.. I was using “{url_title}” in the key name outside the exp:channel:entries tag. 

So, I just tested putting the other speedy fragment back in the channel:entries tag, and that is now working. 

Maybe it was the $config[‘speedy_enabled’] = ‘yes’; that kick-started something? 

At any rate, it’s now caching and writing caches.  Thanks for helping!

 

#3

BoldMinded (Brian)

Oct 27, 2021

Glad to hear it’s working! 😊

#4

Aasun Eble

Oct 27, 2021

Ok. I think I may have answered the “why”..  I purchased from EE.  But, I just went into the speedy settings and I’m getting a “license expired”.. I didn’t realize that the EE license wouldn’t continue to work unless I “claimed” it and attached it to my bold minded account.

So, if bloqs won’t work without a valid license, then that probably why it didn’t work initially.  (in my testing earlier, I saw the “expired” notice, but I didn’t read the “fine print”.. I just clicked “save” and it made the license work again. Looks like there may be a timed license check?

#5

Aasun Eble

5 days ago

I think I’ve found the root cause to all the issues re: speedy, not creating caches, and not doing cache deletes.

In my speedy install on an EE 5 site..  All the speedy default config variables (listed as default in the docs) work without any configuration parameters in the config.php file.  But, in my EE 6 site, I have to explicitly place the default configuration variables in the config.php file. 

So,
1. I have to set the speedy_ttl to something other than 0 (and/or I can specify the ttl in every speedy tag)

2. I have to place $config[‘speedy_break_async’] =‘no’; in my config file or else the cache clearing rules don’t work.


Re: the ttl: with a TTL of 0, the docs say the cache is indefinite… until it’s manually cleared/deleted.  BUT, this isn’t the case in my EE 6 install..  the cache file is created, but on each subsequent template load, a new cache file is created.. So, the cache file is never used.  I can see that the TTL parameter sets the date/time of the cache file that many seconds into the future.  But, with a TTL of 0, the date/time of the cache file is the time it was created.  So, my assumption is that the cache checking system thinks the cache is expired because that date/time is in the past, and so it will always create a new cache file.  Although, there may be other default configuration parameters/variables that control this, and if I haven’t explicitly set them in the config.php file, or in the speedy tags, then it wouldn’t work correctly.

The point is, that none of the speedy “defaults” are actually respected as default settings/values.  Once I started setting the defaults manually, my speedy started working as expected.  (Except for that TTL = 0 thing)

#6

BoldMinded (Brian)

11 hours ago

What cache driver are you using?

The $config[‘speedy_break_async’] =‘no’; default value was just made public in the 1.4.1 release a few minutes ago. I updated the docs in anticipation for the release, so you shouldn’t need to set it in your config file if you update.

#7

BoldMinded (Brian)

10 hours ago

Actually 1.4.2 is out with a small fix. Grab the latest build from your account and try it.

Login to reply