Claude Says:
> This is Bloqs’ own internal output cache - not EE’s tag cache. > > Here’s what’s happening: > Default behavior: caching is OFF > isCacheEnabled() at Library/Basee/Cache.php:137 returns true only when either: > - $config[’bloqs_cache_enabled’] = true is set in your EE config, or > - cache=”yes” is passed as a tag parameter in the template (e.g. {my_bloqs_field cache="yes"}) > Since neither is set by default, caching is disabled out of the box. > > What the cache does when enabled: > When $config[’bloqs_cache_enabled’] = true, Bloqs caches its own rendered HTML output using EE’s cache driver (ee()->cache). > The cache key is entryId/fieldId/replaceTag/…params. This is entirely separate from EE’s built-in template tag cache. > On save (post_save_each hook), it busts the cache for that entry/field combo (ft.bloqs.php:622-626) > On replace_tag(), it returns the cached HTML if present, otherwise renders and saves the result (ft.bloqs.php:709-718, 758-759) > > **So to directly answer your question: ** > Bloqs doesn’t interact with or bypass EE’s tag cache at all. $config[’bloqs_cache_enabled’] = true enables Bloqs’ own separate output-level cache, which is off by default. If you’re seeing tag cache issues with Bloqs output, that’s independent of this config - it would be an EE template caching issue, not a Bloqs one.
I will add - tag caching on channel:entries can only be made active if you also have the “Dynamic Channel Query Caching” setting enabled - otherwise, EE knows that channel:entries output should vary based on entry_date and expiration_date. If you are not future-dating or expiring anything, you can enable it. (The entries tag caching also checks that you’re not using author_id=”CURRENT\_USER”, handles if you’re on a paginated page, and makes sure you’re not using Dynamic Parameters, all of which would make caching the tag be problematic.)
(They could call it “I Know What I’m Doing with Caching” setting because it’s mostly meant to help folks who add cache= to their entries tag without understanding the effect of that on future entries, and I think they should get rid of it for simplicity sake.)
Most other tags, especially EE-native, don’t have variability based on the date, or if they do, EE assumes you know that when you add the cache= to the tag.
Page caching, meanwhile, caches the output of channel:entries regardless, because it doesn’t really have a way to know where what it’s caching comes from, it just caches most of the content of the page, so you see a lot of queries go away with page caching.
Preview mode shouldn’t use the cache at all, but I don’t know how it works in depth.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.