@@ 48-60 (lines=13) @@ | ||
45 | /** |
|
46 | * @inheritdoc |
|
47 | */ |
|
48 | public function isCached($url) |
|
49 | { |
|
50 | $path = $this->urlToPath($url); |
|
51 | if (!file_exists($path) || filectime($path) + $this->seconds < time()) { |
|
52 | echo "Weather data is NOT cached!\n"; |
|
53 | ||
54 | return false; |
|
55 | } |
|
56 | ||
57 | echo "Weather data is cached!\n"; |
|
58 | ||
59 | return true; |
|
60 | } |
|
61 | ||
62 | /** |
|
63 | * @inheritdoc |
@@ 47-55 (lines=9) @@ | ||
44 | /** |
|
45 | * @inheritdoc |
|
46 | */ |
|
47 | public function isCached($url) |
|
48 | { |
|
49 | $path = $this->urlToPath($url); |
|
50 | if (!file_exists($path) || filectime($path) + $this->seconds < time()) { |
|
51 | return false; |
|
52 | } |
|
53 | ||
54 | return true; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * @inheritdoc |