2

In the docs for the State API, the term 'reset' is used, without any reference as to what a reset is:

use State API to store transient information, that is okay to lose after a reset.

I've spent a significant amount of time digging through the back-end implementation of the State API, looking at the database tables, and testing writing values, and as far as I can tell, the state data is never removed. So I'm thinking that by a 'reset', they mean wiping the entire DB, re-installing Drupal, then importing all the config.

I'm just looking for other confirmation before I update the doc page with a clearer explanation. Can anyone confirm that my theory on what a 'reset' is, is correct? And if it's not, can anyone explain what a 'reset' is?

  • 1
    state is instance-specific(like last cron run time), config is site-specific(like system mail) / permanent. Reset means that if you delete all state, nothing breaks. – user21641 Sep 19 '17 at 5:53
  • Thank you for your reply, I appreciate you taking the time, but I'm still not clear on what a 'reset' is. I've never seen this term used in reference to Drupal before this. – Jaypan Sep 19 '17 at 9:17
  • 2
    that documentation is bogus, there is no reset and it is never OK to delete state information, it is also not done :) Please create a bug report – Berdir Sep 19 '17 at 11:14
  • @Berdir: "never OK to delete state information" - what use case is there that would cause site to break if state would got flushed? – user21641 Sep 19 '17 at 11:44
  • 1
    Berdir - thanks. I opened a ticket here: drupal.org/node/2909896 – Jaypan Sep 19 '17 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.