Old cached values in node Edit forms even after updating node ?

Created on 18 April 2016, over 8 years ago
Updated 12 August 2024, 3 months ago

When I update a node the revision show changes in values when we see diff but after updating node when I edit node again in node edit from it shows old value ie: cached value.

When I flush all cache then the updated value start appearing in node edit form.

In site no page cache is enabled, no block cache is enabled. But we are using memcache

Please suggest what kind of cache is effecting values while editing node titles.

I am using modules as well Title and entity_translation

https://www.drupal.org/project/title

https://www.drupal.org/project/entity_translation

In my views there is no cache and I am using template file for views nid in which I fetch titles like below which also shows cached version :

$link = node_load($nid);
$link->title_field['en'][0]['value'] // English value title
$link->title_field['fr'][0]['value'] // French value of title
Should I try like this to get rid of cache:
$link = node_load($nid,null,true); // setting true
Please suggest, I have been trying and searching from long time but not able to find solution. It seems like problems with memcache.

Minimum cache lifetime = none

EDIT: seems kind of some similar problem Need to flush cache after node translation : http://drupal.stackexchange.com/questions/37345/need-to-flush-cache-afte...

I have also gone thorugh https://www.drupal.org/node/1262512 but it says already fixed. But I am facing this problem many times like 4 out of 5 times when edit/update title .

After disabling memcache issue disappears.

please suggest !

Thanks!

💬 Support request
Status

Closed: cannot reproduce

Version

1.5

Component

Code

Created by

🇮🇳India jas1988

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇱🇧Lebanon samirjamal

    Hello, we have the same problem. Upon editing a node after first saving, the data changed in the database but is not reflected in the form because it is still cached. When we clear the cache, the data changes and appears in the cms. 
    Can anyone help on this?
    I am using Drupal 9 and the latest version of Memcache Module 8.x-2.5.

  • 🇸🇪Sweden twod Sweden

    @samirjamal We've had that issue for years too. Last time we investigated it came down to needing transactional support to avoid a race condition specifically with entity cache: 🐛 Transaction support for cache (tags) invalidation Needs review .

    Until then we're using this in our settings file $settings['cache']['bins']['entity'] = 'cache.backend.database'; to move that bin back to the databse.

  • @twod - we were having the same issue and initially the patch for transaction support resolved the issues.

    However it stopped working after update to D10.3 and Memcache 8.x-2.6 and we now periodically get stuck with old revisions after node edit/publish that persist until the cache is cleared... Does anyone have any suggestions here?

Production build 0.71.5 2024