alphagov/whitehall — pull request #1849 by vinayvinay (2014-11-18 09:15:28+00:00)
Title: Fix expiry for collections with nothing scheduled

following-up on: https://github.com/alphagov/whitehall/pull/1837

missed handling one scenario where document collections with none of its items scheduled for publishing still set a max-age of 15.mins.

that's because `expire_on_next_scheduled_publication` doesn't change the expires header if nothing in the collection is scheduled to publish.

i've overridden the `set_cache_control_headers` in this controller to use `documents_collection_cache_max_age` which fixes this.