bradyvercher / gistpress

WordPress plugin to add Gist oEmbed and shortcode support with caching.
GNU General Public License v2.0
143 stars 28 forks source link

Use delete_transient() #2

Closed GaryJones closed 11 years ago

GaryJones commented 11 years ago

In expire_gist_transient(), set_transient() is being used with a negative timeframe, instead of the correct delete_transient() function.

bradyvercher commented 11 years ago

I switched from delete_transient() because the key will most likely be re-used, but switching back ought to clear out transients for shortcodes that have been changed instead of letting them hang around.

GaryJones commented 11 years ago

The point of using delete_transient(), is that it fires different actions and does other stuff, as well as actually deleting a row in a table. There's no harm in deleting a row - WP will just create a new row when needed.

bradyvercher commented 11 years ago

Good point on the hooks that get fired. I didn't think about that.