Author: johnh
Date: Tue Dec 2 13:29:10 2008
New Revision: 722619
URL: http://svn.apache.org/viewvc?rev=722619&view=rev
Log:
Legacy caching JS support for refreshInterval APIs. Brought up from trunk.
Modified:
incubator/shindig/branches/0.8.1-x/features/core/legacy.js
Modified: incubator/shindig/branches/0.8.1-x/features/core/legacy.js
URL:
http://svn.apache.org/viewvc/incubator/shindig/branches/0.8.1-x/features/core/legacy.js?rev=722619&r1=722618&r2=722619&view=diff
==============================================================================
--- incubator/shindig/branches/0.8.1-x/features/core/legacy.js (original)
+++ incubator/shindig/branches/0.8.1-x/features/core/legacy.js Tue Dec 2
13:29:10 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');