unepwcmc/SAPI — pull request #168 by simaob (2014-01-10 15:27:33+00:00)
Title: Fix action caching and sweepers

This Pull Request fixes the cache expiration issues identified with Geo Entities:

- It adds a constant to **GeoEntityType** model with the different sets of geo_entity_types used by the different applications (Species+, Trade, Checklist)
- It changes the **admin/geo_entities_controller** to call the cache_sweeper used by the **api/v1** and **checklist goe_entities_controllers**;
- It updates those two controllers to use a cache_path more standardized using only the **geo_entity_types_set** and **locale** params, it also adds defaults for those params;
- It updates the **cache_sweeper** for Geo Entities to clear the different combinations of params for both the **checklist** and **api/v1**;
- It updates Species+ and Trade to use the new **geo_entity_types_set** variable;

- Similar but more simple changes were made to the **trade_codes** controllers and sweepers (units, terms, purposes, and sources).

The CITES Checklist master branch was also updated to follow this change, and it should also be tested alongside.

To test this in development don't forget to enable caching on **config/environments/development.rb**
config.action_controller.perform_caching = true