diff --git a/php/MeterMaid.php b/php/MeterMaid.php index 47f5e33..4a8ee0d 100644 --- a/php/MeterMaid.php +++ b/php/MeterMaid.php @@ -33,6 +33,11 @@ public static function make( $id, $limit, $interval ) { $meter = new Meter( $id, $limit, $interval ); } + if ($meter->get_reset() <= 0) { + wp_cache_delete(self::get_cache_key($meter->get_id()), 'wprestcop'); + return static::make($id, $limit, $interval); + } + return $meter; }