projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7397336
)
Mailer.php
author
Alan Knowles
<alan@roojs.com>
Wed, 22 Aug 2012 03:45:36 +0000
(11:45 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 22 Aug 2012 03:45:36 +0000
(11:45 +0800)
Mailer.php
patch
|
blob
|
history
diff --git
a/Mailer.php
b/Mailer.php
index
55ff7ac
..
50abc39
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-171,7
+171,12
@@
class Pman_Core_Mailer {
// CACHE???
// 2 files --- the info file.. and the actual file...
$cache = ini_get('session.save_path').'/Pman_Core_Mailer/' . md5($url);
-
+ if (file_exists($cache) and filemtime($cache) > strtotime('NOW - 1 WEEK')) {
+ return json_decode($cache);
+ }
+ if (!file_exists(dirname($cache))) {
+ mkdir(dirname($cache),0666, true);
+ }
$a = &new HTTP_Request($url);
$a->sendRequest();