Fix simple_cache_store inconsistencies.
Add support for ref_table.