-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to change sync frequency? #81
Comments
Hey @naneri, I am not aware of any restriction that can be set in .ics files to prevent the client to update. Maybe you can show more of your problem? How does your generated .ics file look like? How does the code look like that generates the file? |
public function generateIcal($user_id)
{
$vCalendar = new Calendar(config('app.url'));
$plans = MealPlan::where('user_id', $user_id)->get();
foreach($plans as $plan){
$vEvent = new Event();
$vEvent
->setDtStart(new \DateTime($plan->date))
->setDtEnd(new \DateTime($plan->date))
->setNoTime(true)
->setSummary($plan->type);
$vCalendar->addComponent($vEvent);
}
return response($vCalendar->render())
->withHeaders([
'Content-Type' => 'text/calendar; charset=utf-8',
'Content-Disposition' => 'attachment; filename="cal.ics"'
]);
} Here is the code. |
BEGIN:VCALENDAR |
In the generated .ics file I cannot see anything that will prevent the consumer/client to update the information from that file. Normally caching would be the concern of a different layer. Normally the iCal files are transferred using HTTP. Any rule for caching etc. could be made there. One thing that looks wrong in the generated is that the events have the same UID instead having their own UID that must differ from all others. (I will have a look into that later but this might not be your actual problem here.) Which version of Outlook are you using? Did you already search for the message and how to avoid it? |
As a conclusion: to me this problem looks like a problem fro the client rather than from the generated .ics file. You could also try another client instead of Outlook to verify that. |
@markuspoerschke it seems that the problem is with Microsoft Outlook, it thinks that all .ics set update rate to 168 hours, by default, and for instance on Mac you can sync the events manually or with much higher frequence (like every five minutes at least). |
@naneri Can I close this issue then? |
I would guess it is respecting |
I was really not ready this issue carefully enough. @jrjohnson Do you have expirience with this property? Do you think the default value of 1 week makes sense? Maybe it is better to drop the default and make it optional? |
I've personally always set it at one hour - but that makes the most sense for our use case. I would see removing the default as a breaking change for anyone relying on it - but other than that I only have our own usage to compare it to. |
I removed the default value for The unpublished version 0.12 contains breaking changes anyways like the PHP version constraint. |
RFC 7986 introduced a REFRESH-INTERVAL property: |
I have imported the cal generated by this package to outlook and it says that it will sync once in 168 hours, due to the limit set by the calendar provider. Is there a way to change this ?
The text was updated successfully, but these errors were encountered: