Print Page | Close Window

Preload Into Cache?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=6342
Printed Date: 08 July 2024 at 6:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Preload Into Cache?
Posted By: hildegoat
Subject: Preload Into Cache?
Date Posted: 07 February 2007 at 11:26am
I have the calendar control running nicely, but I'm still running into some slowness issues.

I'm using a custom data provider (SQL Server) and using the providerSQLServer and SQLDataHelper files. I have multiple users (we use it for clinic appointments) so I need to refresh the data every couple of minutes. I do the CalendarControl.DataProvider.ClearCache() and CalendarControl.Populate() on a timer to refresh the calendar.

The slowness occurs when the user is going back and forth through dates after a refresh. I know this occurs because it has to load the data into the cache and display it, causing a delay. If the user is looking at cached data, the calendar is speedy.

Is there any possible way that I can preload data into the cache so that I can call it after a refresh? That way the user is always using cached data and only taking the slowness hit once (on the refresh, not on every flip forward and backward).



Replies:
Posted By: sserge
Date Posted: 07 February 2007 at 2:33pm
Hi,

To preload events for a specific day, simply call 
CalendarControl.DataProvider .RetrieveDayEvents for this day.

Also you can make this caching regular using timer for example. Example is our Date Picker where dates marked with bold in the background using timer and RetrieveDayEvent method.

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net