NateJacobs / Brickset-API

WordPress Plugin: Display your favorite LEGO® set information on your website using the Brickset API. This plugin is an implementation of the Brickset Webservice. It includes methods to get LEGO® set and theme data from Brickset as well as pre-formated methods to display set data. The set data requested is cached daily to reduce HTTP requests and page load time. Please visit Brickset.com for more information on the webservice. You can obtain an API key from Brickset.
GNU General Public License v2.0
17 stars 2 forks source link

Allow admins to set how long each transient should last #13

Closed NateJacobs closed 11 years ago

NateJacobs commented 11 years ago

Provide an option in the plugin settings for each call and set how long, using transient constants, each response should persist.

MINUTE_IN_SECONDS = 60 (seconds) HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS WEEK_IN_SECONDS = 7 * DAY_IN_SECONDS YEAR_IN_SECONDS = 365 * DAY_IN_SECONDS

http://codex.wordpress.org/Transients_API

NateJacobs commented 11 years ago

Minimum should be day.

NateJacobs commented 11 years ago

Add drop-down on settings page.

NateJacobs commented 11 years ago

Add setting for each type of return.

NateJacobs commented 11 years ago

Instead of a settings option add a filter to allow the values to be changed from code.

NateJacobs commented 11 years ago

Filters were added to allow developers to override the transient time. Decisions not options. This was closed by the 3dot6 pull request.