i manually remove a column of field_data_field_about in database belongs to some users. and this field is user field. And after in admin panel i edit this user which i delete this user column from database. But this user about value is shown there. Then i Clear All Caches then i come back to edit this user the about value is gone.

How can i disable cache for users fields?

1 Answer 1


I'm really not sure why you'd want to remove a column from a field table but just looking at your problem as is, a way by which you can disable caching of field values in the cache_field bin is by letting Drupal know that you don't want values for the field instances attached to a given entity type to be cached at all.

You can do this by implementing hook_entity_info_alter() from a custom module and setting the field cache key for the user entity as shown below:

function mymod_entity_info_alter(&$info) {
  $info['user']['field cache'] = FALSE;

You might find the documentation of hook_entity_info here useful. You might also want to lookup the definition of field_attach_load() from here.

  • users has mobile field and i send sms to this mobile number when users reset this or delete this number in admin i edit this user but the mobil number not gone when i clear cahche the mobile number is gone. İs this a problem or not?
    – turkaze
    Dec 26, 2012 at 17:15
  • should i disable cahce for this field or not disable it i don't know.
    – turkaze
    Dec 26, 2012 at 17:16
  • in my second comment i want to say users modify number on their profile after i'm admin in admin panel i test this user if number is gone.
    – turkaze
    Dec 26, 2012 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.