Author: johnh
Date: Tue Dec  2 11:55:15 2008
New Revision: 722590

URL: http://svn.apache.org/viewvc?rev=722590&view=rev
Log:
Legacy caching APIs support refreshInterval.


Modified:
    incubator/shindig/trunk/features/core/legacy.js

Modified: incubator/shindig/trunk/features/core/legacy.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/core/legacy.js?rev=722590&r1=722589&r2=722590&view=diff
==============================================================================
--- incubator/shindig/trunk/features/core/legacy.js (original)
+++ incubator/shindig/trunk/features/core/legacy.js Tue Dec  2 11:55:15 2008
@@ -98,11 +98,15 @@
       }, params);
 }
 
-function _IG_GetCachedUrl(url) {
-  return gadgets.io.getProxyUrl(url);
+function _IG_GetCachedUrl(url, opt_params) {
+  var params = { 'REFRESH_INTERVAL': 3600 };
+  if (opt_params && opt_params.refreshInterval) {
+    params['REFRESH_INTERVAL'] = opt_params.refreshInterval;
+  }
+  return gadgets.io.getProxyUrl(url, params);
 }
-function _IG_GetImageUrl(url) {
-  return gadgets.io.getProxyUrl(url);
+function _IG_GetImageUrl(url, opt_params) {
+  return _IG_GetCachedUrl(url, opt_params);
 }
 function _IG_GetImage(url) {
   var img = document.createElement('img');


Reply via email to