This past thread may provide an answer depending on what else is being done within your script.
Without seeing your config.yml it is not possible to add much as most issues with the cache sub-system come from the interaction between different parts of the config.yml.