Questions tagged [cache]

The tag has no usage guidance.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
179 views

Caching matrix that contains Freeform field

I've got a matrix block that most pages on my site are built from, and one of its blocks is a Solspace Freeform form field. I want to be able to cache the entire output of the matrix, but that makes ...
2
votes
0answers
175 views

Cache not invalidating when new entry is created

I realise this is probably a duplicate of the other questions just like it but I thought I'd raise it here before filing a bug with P&T. Basically, when a new entry is added to a section, the ...
1
vote
0answers
16 views

How to append current version to post URL - versioning a post

I'm middle of a PWA app and one of the problems facing is versioning, once the post cached using Service Worker and if any change amended(ex: if it is an event post, the event end date may be extended....
1
vote
1answer
123 views

How do I flush the query cache?

How do I flush Craft's query cache so that I may query a relationship field again in the same web request with a new set of parameters? In this particular scenario, I need to handle it inside of a ...
1
vote
0answers
81 views

Avoiding includeJsFile, includeJS from caching

In my template, I have an includeJSFile that loads properly on the first load, but disappears on subsequent loads. The includeJSFile is outside the caching tags, so I'm not sure why this is still ...
1
vote
0answers
200 views

Error while sending QUERY packet. PID=881 when using cache key

If I do: {% set cacheKey = block.id %} {% cache using key cacheKey if craft.app.config.general.cache %} {% for item in items %} <div class="swiper-slide ais-hits--item" data-id="{{ ...
1
vote
0answers
413 views

What are my caching options when using CraftQL and React?

I’m experimenting with the CraftQL plugin and React with Craft 3, and I’m really liking the similar syntax to standard Twig element queries, and the fact I don't need to manually configure API ...
1
vote
0answers
486 views

Craft Nginx Cache Static Resources - Css, JS Errors

I'm currently trying to cache css and js files with the widely known config as follows: location ~* \.(png|jpg|css|js|jpeg|gif|ico|xls|doc|zip|exe|mp3|mp4|pdf|ai|psd|eps|ppt|dmg|csv|key|numbers|cur|...
1
vote
0answers
435 views

craft_cache / Integrity constraint violation: 1062 Duplicate entry, Serialization failure: 1213 Deadlock

Noticing these errors a lot it my logs. Any idea why, or how to stop it from happening? Jan 27 15:02:58 myapp.com ool: myapp: [craft] [error] [system.db.CDbCommand] CDbCommand::execute() failed: ...
1
vote
0answers
221 views

Craft Cache Dependency with Redis

I am trying to make dependency's work using Craft Cache (set to Redis.) I've tried: craft()->cache->set('cache_key', 'cache_value', 0, new CFileCacheDependency('dependent_cache_key')); This ...
1
vote
0answers
430 views

Set Cache-Control is being overridden

We are setting our Cache-Control headers in the layout file for all templates. However some templates the Cache-Control is being overridden. Why might this be? {% set expiry = now|date_modify('+10 ...
1
vote
0answers
217 views

Limit fields in query / Optimize query

What I'm doing is fairly simple: {% cache %} {% set jobs = craft.entries.section('job').find({ order: 'dateCreated asc', limit: 0 }) %} {% for job in jobs %} {{ macros.jobProfile(job) ...
1
vote
0answers
210 views

Performance and cache when using entry type templates and getSegment

I'm working on a site that will end up having 30-40+ structure sections which are sharing templates and will be using about 10 different entry types. (This would probably be much easier if I used ...
0
votes
0answers
22 views

How to configure Craft to work with Redis replicas?

We have an existing load balanced / HA deployment of Craft 3.4, to which I want to add support for the redis replica we have available, but I can't work out how to correctly configure this in config/...
0
votes
0answers
29 views

How to stop caching entries/templates?

I have a dynamic form that creates entries in Craft 3 Pro. These entries are displayed in a "Profile Page" for each user, but it only shows the newly created entries after hitting refresh 2 ...
0
votes
0answers
25 views

Paginate and Cache Together and SEOmatic helpers

I am struggling to get this working correctly. If I keep the element queries outside the cache tag then this naturally stops the cache being broken and so is not a viable option. However, when I put ...
0
votes
0answers
18 views

Has anywhere users successfully run Craft 3 on CyberPanel / OpenLiteSpeed?

I've been trying to get a Craft CMS 3 project running on CyberPanel 2.x (with OpenLiteSpeed v1.6.14). For the most part everything has gone well. Where I get stuck is with the LiteSpeed caching. The ...
0
votes
0answers
75 views

Multisite with unique domains not working with Forge config

I have a live install with a primary domain of https://marketing.vessul.co/ which works great. When I've added another site to this install and it's location is another folder such as /extra-site it ...
0
votes
0answers
13 views

Cache Control Panel resources

Is it possible to enable Browser Caching for the cp resources? Did not find anything in the documentation about it and my custom set headers in nginx does not work for them. I am working with craft 3 ...
0
votes
0answers
10 views

Cached Images falling back to IP

I'm having a strange problem which I'm unsure if it's my hosting or my Craft's config. My images which I have within a Cached template, once the cache expires or sometimes before they go back to the ...
0
votes
0answers
6 views

Use “last-editorial-change” into cache key

Is there some kind of timestamp which reflects the last overall editorial change in Craft? I would like to use this for a cache key which automatically invalidates as soon as anything (Entry, Asset, ...
0
votes
0answers
12 views

Clear Cache on user profile update

Using a module, would it be possible to clear the cache of a particular user when that user updates their profile? A use case for this is we have a directory of users (authors) but if they update ...
0
votes
0answers
23 views

How to cache location per guest in craft cache via plugin

I am looking at setting the currency of a guest site visitor. I have the look up and currency retrieval working OK based on the individuals IP. The problem i seem to face is how to cache the currency ...
0
votes
0answers
44 views

Cache not outputting chunks of content

I have a simple caching setup on this site. I have a layout template that extends it has this: {% block content %} {% cache %} <p>my content</p> {% endcache %} {% endblock %}...
0
votes
0answers
836 views

Folder Permissions for Assets, Cache, and temp

I have set 755 permissions to these folders and they are owned by the PHP web user. However, I'm still getting logs that say: [error] [application] Could not delete the file /var/www/craft/storage/...
0
votes
0answers
50 views

Caching of categories is not purged on adding new category

In a site we are currently developing I have setup a basic cache mechanism on each template that can benefit from it by reducing the number of db queries. The {% cache %} tag is basically in the ...
0
votes
0answers
47 views

Can you store cropped cloud assets locally?

Currently I'm seeing them cropped and stored on the remote bucket. Is there a way to force them to be stored locally and retrievable via an Asset URL method?
0
votes
1answer
270 views

Craft 3: Cache element query or variable assignment

Is it possible to cache a variable assignment and/or an element query with TWIG in Craft 3? With Yii2 this is possible, but is there a wrapper to TWIG? 2 use cases: {% set entries = craft.entries....