WordPress.org

Plugin Directory

Changeset 230057


Ignore:
Timestamp:
04/16/10 22:23:18 (4 years ago)
Author:
jmabe
Message:

don't cache blank responses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dsidxpress/trunk/api-request.php

    r227463 r230057  
    7171        if (empty($response["errors"]) && substr($response["response"]["code"], 0, 1) != "5") { 
    7272            $response["body"] = self::FilterData($response["body"]); 
    73             if ($cacheSecondsOverride !== 0) 
     73            if ($cacheSecondsOverride !== 0 && $response["body"]) 
    7474                set_transient($transientKey, $compressCache ? base64_encode(gzdeflate(serialize($response))) : $response, $cacheSecondsOverride === null ? self::$CacheSeconds : $cacheSecondsOverride); 
    7575            $response["body"] = self::ExtractAndEnqueueStyles($response["body"], $echoAssetsIfNotEnqueued); 
Note: See TracChangeset for help on using the changeset viewer.