change cache check
This commit is contained in:
parent
42fb68759e
commit
6e0eb2abcc
1 changed files with 2 additions and 1 deletions
|
@ -145,6 +145,7 @@ class TrackerController extends Controller
|
|||
// Otherwise, download the trip data from the Wayward API.
|
||||
if ($forceDownload) {
|
||||
Log::debug("Forcing download for '{$tripFileName}'.");
|
||||
Storage::disk('local')->delete($tripFileName);
|
||||
} else {
|
||||
Log::debug("No cached trip file found for '{$tripFileName}'.");
|
||||
}
|
||||
|
@ -168,7 +169,7 @@ class TrackerController extends Controller
|
|||
Storage::disk('local')->put($tripFileName, json_encode($data));
|
||||
} else {
|
||||
$cachedData = json_decode(Storage::disk('local')->get($tripFileName));
|
||||
if ($data->trip->updated_at !== $cachedData->trip->updated_at) {
|
||||
if (end($data->checkins)->date !== end($cachedData->checkins)->date) {
|
||||
Log::debug(
|
||||
"Cached trip file '" .
|
||||
$tripFileName .
|
||||
|
|
Loading…
Reference in a new issue