Skip to main content
Tweeted twitter.com/StackDrupal/status/1499444502452477969
edited tags
Source Link
leymannx
  • 18.8k
  • 6
  • 72
  • 126

In my module, I can call cache_clear_all() (D7) or drupal_flush_all_caches() (D8), and this would clear the cache for all the nodes.

Is there a way to clear the cache for a single node?

What I need to do is setting up a module that, when it selects a story on a list, it changes the value of a node field. Right now, I change the field value by updating the database table containing that value, but I need to clear the cache for the value to be updated across the site.

Is there's a better way to update a node than directly changing the database table?

In my module, I can call drupal_flush_all_caches(), and this would clear the cache for all the nodes.

Is there a way to clear the cache for a single node?

What I need to do is setting up a module that, when it selects a story on a list, it changes the value of a node field. Right now, I change the field value by updating the database table containing that value, but I need to clear the cache for the value to be updated across the site.

Is there's a better way to update a node than directly changing the database table?

In my module, I can call cache_clear_all() (D7) or drupal_flush_all_caches() (D8), and this would clear the cache for all the nodes.

Is there a way to clear the cache for a single node?

What I need to do is setting up a module that, when it selects a story on a list, it changes the value of a node field. Right now, I change the field value by updating the database table containing that value, but I need to clear the cache for the value to be updated across the site.

Is there's a better way to update a node than directly changing the database table?

improved grammar and punctuation
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

drupal function to How do I clear the cache onfor a single node?

So inIn my module, I can call

drupal_flush_all_caches()

I know for sure that will drupal_flush_all_caches(), and this would clear the cache of myfor all the nodes. But is

Is there a way to clear the cache on justfor a single node? 

What I need to do setis setting up a module that, when it selects a story on a list, it changes a number that is kept onthe value of a field in that node field. Right now, I change the field value of the number by calling an update onupdating the mysqldatabase table containing that number. But you havevalue, but I need to clear drupal'sthe cache for itthe value to update pages and viewsbe updated across the site.

Maybe'sIs there's a better way to update a node then justthan directly changing the database table directly?

drupal function to clear cache on a single node

So in my module I can call

drupal_flush_all_caches()

I know for sure that will clear the cache of my nodes. But is there a way to clear cache on just a single node? What I need to do set up a module that when it selects a story on a list it changes a number that is kept on a field in that node. Right now I change the value of the number by calling an update on the mysql table containing that number. But you have to clear drupal's cache for it to update pages and views across the site.

Maybe's there's a better way to update a node then just changing the table directly?

How do I clear the cache for a single node?

In my module, I can call drupal_flush_all_caches(), and this would clear the cache for all the nodes.

Is there a way to clear the cache for a single node? 

What I need to do is setting up a module that, when it selects a story on a list, it changes the value of a node field. Right now, I change the field value by updating the database table containing that value, but I need to clear the cache for the value to be updated across the site.

Is there's a better way to update a node than directly changing the database table?

Source Link
Tyler
  • 165
  • 1
  • 2
  • 12

drupal function to clear cache on a single node

So in my module I can call

drupal_flush_all_caches()

I know for sure that will clear the cache of my nodes. But is there a way to clear cache on just a single node? What I need to do set up a module that when it selects a story on a list it changes a number that is kept on a field in that node. Right now I change the value of the number by calling an update on the mysql table containing that number. But you have to clear drupal's cache for it to update pages and views across the site.

Maybe's there's a better way to update a node then just changing the table directly?