Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
thanks for the answer. okay i say it clearly. – turkaze Dec 26 '12 at 17:13
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 '12 at 17:15
should i disable cahce for this field or not disable it i don't know. – turkaze Dec 26 '12 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 '12 at 17:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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