frostwire/frostwire-android — pull request #135 by gubatron (2014-10-31 21:34:55+00:00)
Title: Clears Crawl Cache DB

@aldenml
Naive implementation to fix Issue #118 Clear Search Cache (not implemented)

There was a note there to possibly discuss how this would be implemented.

As of now, I did a very naive implementation of this, basically:

1. Made cache object non final, so I could destroy the cache and recreate the object.
2. Doesn't take into consideration what would happen in the even of clearing the cache while performing a search.

Nothing seemed to break, worked as expected.

### Related
This made me take a look at how the cache is being used and I have a feeling that we can optimize how we go after cached results for a particular search an user might repeat.

Will open another ticket for that discussion once I have again a full grasp of the search/cache getting algorithm so that I can propose a modification.