|
@@ -32,7 +32,7 @@ returns calendar object
|
|
end
|
|
end
|
|
|
|
|
|
# prevent multiple setups for same ip
|
|
# prevent multiple setups for same ip
|
|
- cache = Cache.get('Calendar.init_setup.done')
|
|
|
|
|
|
+ cache = Cache.read('Calendar.init_setup.done')
|
|
return if cache && cache[:ip] == ip
|
|
return if cache && cache[:ip] == ip
|
|
|
|
|
|
Cache.write('Calendar.init_setup.done', { ip: ip }, { expires_in: 1.hour })
|
|
Cache.write('Calendar.init_setup.done', { ip: ip }, { expires_in: 1.hour })
|
|
@@ -156,7 +156,7 @@ returns
|
|
# only sync every 5 days
|
|
# only sync every 5 days
|
|
if id
|
|
if id
|
|
cache_key = "CalendarIcal::#{id}"
|
|
cache_key = "CalendarIcal::#{id}"
|
|
- cache = Cache.get(cache_key)
|
|
|
|
|
|
+ cache = Cache.read(cache_key)
|
|
return if !last_log && cache && cache[:ical_url] == ical_url
|
|
return if !last_log && cache && cache[:ical_url] == ical_url
|
|
end
|
|
end
|
|
|
|
|