One note: I think it is useful to mention the users of the module to clear the cache after adding a new token. At first I could not find my token until I flush the caches.

Comments

matrixlord’s picture

Hello, I guess you are right! I will add a notice in the config page of the module. Thanks!

  • matrixlord committed eb3265d on 7.x-1.x
    Issue #2406485: Clear cache after adding new token.
    
bigbozz’s picture

Between line 112 and 113 you can put this code in your .module file:

//clear token cache
db_query("DELETE FROM cache_token;");

When a token is made, the system cleared the cache of the token module.

matrixlord’s picture

Clearing all token cache seems to be a little bit cruel to the system. Also, default cache storage could be in memcached, filecache etc and not necessarily in DB.

Maybe something like

cache_clear_all('auto-login-url-tokens*', 'cache_token', TRUE);

could be the answer. I will check it soon.

matrixlord’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.