[gnome-web-www] Membership: enables caching for members list again
- From: Fabiana Pedreira Simões <fabianaps src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-www] Membership: enables caching for members list again
- Date: Sun, 12 Oct 2014 10:45:45 +0000 (UTC)
commit 14ea85eb14cbcdf2104d58ebafd5f893c115374c
Author: Fabiana Simões <fabianapsimoes gmail com>
Date: Sun Oct 12 12:45:36 2014 +0200
Membership: enables caching for members list again
theme/page-membership.php | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/theme/page-membership.php b/theme/page-membership.php
index b009044..a7897fb 100644
--- a/theme/page-membership.php
+++ b/theme/page-membership.php
@@ -1,7 +1,17 @@
<?php
+
+
+if (false === ($members = get_transient('foundation_members_list'))) {
+
$members_url = "https://foundation.gnome.org/membership/membershiplist";
$members = json_decode(file_get_contents($members_url));
+ echo $members;
+
+ // keeps a 12-hour cache until another HTTP request
+ // to get the members list
+ set_transient('foundation_members_list', $members, 60*60*12);
+
}
require_once("header.php"); ?>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]