1

Topic: Delete caching tables

Good afternoon, is ok to empty the following tables in warehouse manually, by postgres sql command?

cache_occurrences
cache_taxa_taxon_lists
cache_taxon_searchterms
cache_termlists_terms

Thanks

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

2

Re: Delete caching tables

Hi Carlo,
You shouldn't really need to do that as they are dynamically maintained. If you do you will need to delete the entries in the variable table then visit the scheduled_tasks path many times until they are repopulated.
Regards
John

John van Breda
Biodiverse IT

3

Re: Delete caching tables

Hi John, i ask this because i see in these tables, entries from 2012...
Which/what  is the "scheduled_tasks" path?

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

4

Re: Delete caching tables

Hi Carlo,

The cache_occurrences table, for example, should contain an entry for every record in the occurrences table that is not marked as deleted. It may be correct for there to be records from 2012 within it.

See the documentation on scheduled tasks at http://indicia-docs.readthedocs.org/en/ … tasks.html

Jim Bacon

5

Re: Delete caching tables

Hi Jim, thanks for the link, i will read it. But if i delete sample/occurrence directly from database via SQL, i can update these table entries? Thanks

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

6

Re: Delete caching tables

Hi Carlo,

If you update samples/occurrences with set deleted = true using SQL then the scheduled tasks will remove those records from the cache.

If you delete samples/occurrences with SQL then I suspect the cache will not update correctly and you would probably need to delete the records from the cache with SQL too.

Jim Bacon.