How to cache other user's calendar info?

  • Thread starter Thread starter Tadwick
  • Start date Start date
T

Tadwick

Hi there,

If I write some code that returns all appointments for Exchange users that
have delegated reveiw permissions to me, how should I cache the info so that
I only need to return appointment data that has been modified since the last
time I checked? I understand how to filter out older, unchanged data but
I'm wondering if there is a way that outlook cache's the older data and for
how long? Alternatively, could I store that user's data in a local calendar
folder or do I need to write it to a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
You could use the ICS (Incremental Change Synchronization) API for that, but
it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
It wouldn't help filter - that would be done with VBA - but it would be a
means of storing calendar information locally instead of having to retrieve
it each time. That is the reason for the original post - does Outlook store
retrieved Calendar info in some kind of cache or the pst or do I have to
retrieve all calendar info for other users each time I want to view it?
 
AFAIK other mailboxes are not cached. Only the primary mailbox and the
Favorites are cached if set so.
And to store the calendar information locally using your code, wouldn't you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1, 2006'")
 
How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1, 2006'")

Dmitry Streblechenko said:
AFAIK other mailboxes are not cached. Only the primary mailbox and the
Favorites are cached if set so.
And to store the calendar information locally using your code, wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
not sure, what do you suggest?

Dmitry Streblechenko said:
How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1, 2006'")

Dmitry Streblechenko said:
AFAIK other mailboxes are not cached. Only the primary mailbox and the
Favorites are cached if set so.
And to store the calendar information locally using your code, wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

It wouldn't help filter - that would be done with VBA - but it would be
a
means of storing calendar information locally instead of having to
retrieve
it each time. That is the reason for the original post - does Outlook
store
retrieved Calendar info in some kind of cache or the pst or do I have
to
retrieve all calendar info for other users each time I want to view it?

:

How would that help to filter out old/unchanged items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

how about
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/OtlkCustInEntApp.asp ?




You could use the ICS (Incremental Change Synchronization) API for
that,
but it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi there,

If I write some code that returns all appointments for Exchange
users
that have delegated reveiw permissions to me, how should I cache
the
info so that I only need to return appointment data that has been
modified since the last time I checked? I understand how to
filter
out
older, unchanged data but I'm wondering if there is a way that
outlook
cache's the older data and for how long? Alternatively, could I
store
that user's data in a local calendar folder or do I need to write
it
to
a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
If you don't use the ICS, you can only load both the target and destination
folders and figure out which items were deleted. You can of course assume
that deletions are rare compared to inserts/modifications and avoid
processing deletions every time you sync, but still, there is no way around
it, you need to load both folders to see which ones are gone.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
not sure, what do you suggest?

Dmitry Streblechenko said:
How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1,
2006'")

:

AFAIK other mailboxes are not cached. Only the primary mailbox and the
Favorites are cached if set so.
And to store the calendar information locally using your code,
wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

It wouldn't help filter - that would be done with VBA - but it would
be
a
means of storing calendar information locally instead of having to
retrieve
it each time. That is the reason for the original post - does
Outlook
store
retrieved Calendar info in some kind of cache or the pst or do I
have
to
retrieve all calendar info for other users each time I want to view
it?

:

How would that help to filter out old/unchanged items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

how about
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/OtlkCustInEntApp.asp ?




You could use the ICS (Incremental Change Synchronization) API
for
that,
but it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi there,

If I write some code that returns all appointments for Exchange
users
that have delegated reveiw permissions to me, how should I
cache
the
info so that I only need to return appointment data that has
been
modified since the last time I checked? I understand how to
filter
out
older, unchanged data but I'm wondering if there is a way that
outlook
cache's the older data and for how long? Alternatively, could
I
store
that user's data in a local calendar folder or do I need to
write
it
to
a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
Dmitry,

Thanks for all the assistance with this issue.

ICS sounds more complicated than I can handle right now. If I am going to
have to load the remote data just to compare to the local cache, then that
seems to defeat the performance gains I was after.

What is the most efficient means of retrieving calendar data from Exchange
Server?

Thanks, Tad

Dmitry Streblechenko said:
If you don't use the ICS, you can only load both the target and destination
folders and figure out which items were deleted. You can of course assume
that deletions are rare compared to inserts/modifications and avoid
processing deletions every time you sync, but still, there is no way around
it, you need to load both folders to see which ones are gone.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
not sure, what do you suggest?

Dmitry Streblechenko said:
How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1,
2006'")

:

AFAIK other mailboxes are not cached. Only the primary mailbox and the
Favorites are cached if set so.
And to store the calendar information locally using your code,
wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

It wouldn't help filter - that would be done with VBA - but it would
be
a
means of storing calendar information locally instead of having to
retrieve
it each time. That is the reason for the original post - does
Outlook
store
retrieved Calendar info in some kind of cache or the pst or do I
have
to
retrieve all calendar info for other users each time I want to view
it?

:

How would that help to filter out old/unchanged items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

how about
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/OtlkCustInEntApp.asp ?




You could use the ICS (Incremental Change Synchronization) API
for
that,
but it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi there,

If I write some code that returns all appointments for Exchange
users
that have delegated reveiw permissions to me, how should I
cache
the
info so that I only need to return appointment data that has
been
modified since the last time I checked? I understand how to
filter
out
older, unchanged data but I'm wondering if there is a way that
outlook
cache's the older data and for how long? Alternatively, could
I
store
that user's data in a local calendar folder or do I need to
write
it
to
a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
MAPI tables is probably the fastest way. What language and API are you
using?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
Dmitry,

Thanks for all the assistance with this issue.

ICS sounds more complicated than I can handle right now. If I am going to
have to load the remote data just to compare to the local cache, then that
seems to defeat the performance gains I was after.

What is the most efficient means of retrieving calendar data from Exchange
Server?

Thanks, Tad

Dmitry Streblechenko said:
If you don't use the ICS, you can only load both the target and
destination
folders and figure out which items were deleted. You can of course assume
that deletions are rare compared to inserts/modifications and avoid
processing deletions every time you sync, but still, there is no way
around
it, you need to load both folders to see which ones are gone.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
not sure, what do you suggest?

:

How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1,
2006'")

:

AFAIK other mailboxes are not cached. Only the primary mailbox and
the
Favorites are cached if set so.
And to store the calendar information locally using your code,
wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

It wouldn't help filter - that would be done with VBA - but it
would
be
a
means of storing calendar information locally instead of having
to
retrieve
it each time. That is the reason for the original post - does
Outlook
store
retrieved Calendar info in some kind of cache or the pst or do I
have
to
retrieve all calendar info for other users each time I want to
view
it?

:

How would that help to filter out old/unchanged items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

how about
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/OtlkCustInEntApp.asp ?




You could use the ICS (Incremental Change Synchronization)
API
for
that,
but it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi there,

If I write some code that returns all appointments for
Exchange
users
that have delegated reveiw permissions to me, how should I
cache
the
info so that I only need to return appointment data that has
been
modified since the last time I checked? I understand how to
filter
out
older, unchanged data but I'm wondering if there is a way
that
outlook
cache's the older data and for how long? Alternatively,
could
I
store
that user's data in a local calendar folder or do I need to
write
it
to
a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
c# for an eventual VSTO solution (if possible)

Dmitry Streblechenko said:
MAPI tables is probably the fastest way. What language and API are you
using?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
Dmitry,

Thanks for all the assistance with this issue.

ICS sounds more complicated than I can handle right now. If I am going to
have to load the remote data just to compare to the local cache, then that
seems to defeat the performance gains I was after.

What is the most efficient means of retrieving calendar data from Exchange
Server?

Thanks, Tad

Dmitry Streblechenko said:
If you don't use the ICS, you can only load both the target and
destination
folders and figure out which items were deleted. You can of course assume
that deletions are rare compared to inserts/modifications and avoid
processing deletions every time you sync, but still, there is no way
around
it, you need to load both folders to see which ones are gone.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

not sure, what do you suggest?

:

How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1,
2006'")

:

AFAIK other mailboxes are not cached. Only the primary mailbox and
the
Favorites are cached if set so.
And to store the calendar information locally using your code,
wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

It wouldn't help filter - that would be done with VBA - but it
would
be
a
means of storing calendar information locally instead of having
to
retrieve
it each time. That is the reason for the original post - does
Outlook
store
retrieved Calendar info in some kind of cache or the pst or do I
have
to
retrieve all calendar info for other users each time I want to
view
it?

:

How would that help to filter out old/unchanged items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

how about
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/OtlkCustInEntApp.asp ?




You could use the ICS (Incremental Change Synchronization)
API
for
that,
but it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi there,

If I write some code that returns all appointments for
Exchange
users
that have delegated reveiw permissions to me, how should I
cache
the
info so that I only need to return appointment data that has
been
modified since the last time I checked? I understand how to
filter
out
older, unchanged data but I'm wondering if there is a way
that
outlook
cache's the older data and for how long? Alternatively,
could
I
store
that user's data in a local calendar folder or do I need to
write
it
to
a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
Then you arae probably limited to OOM where you can just loop through all
the items in the folder. Outlook tries to be smart and not open the
appointment retrieved from teh MAPIFolder.Items collection unless it really
needs to. And it needs to open the appointment if teh requested property is
not cached. To make sure Outlook always caches the properties that you will
be accessing, use MAPIFolder.Items.SetColumns. Make sure you cache the
valuee of Items in a separate variablee rather than call MAPIFolder.Items
every time.
You might also want to look at the MAPITable object in Redemption - see
http://www.dimastr.com/redemption/mapitable.htm

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
c# for an eventual VSTO solution (if possible)

Dmitry Streblechenko said:
MAPI tables is probably the fastest way. What language and API are you
using?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
Dmitry,

Thanks for all the assistance with this issue.

ICS sounds more complicated than I can handle right now. If I am going
to
have to load the remote data just to compare to the local cache, then
that
seems to defeat the performance gains I was after.

What is the most efficient means of retrieving calendar data from
Exchange
Server?

Thanks, Tad

:

If you don't use the ICS, you can only load both the target and
destination
folders and figure out which items were deleted. You can of course
assume
that deletions are rare compared to inserts/modifications and avoid
processing deletions every time you sync, but still, there is no way
around
it, you need to load both folders to see which ones are gone.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

not sure, what do you suggest?

:

How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1,
2006'")

:

AFAIK other mailboxes are not cached. Only the primary mailbox
and
the
Favorites are cached if set so.
And to store the calendar information locally using your code,
wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

It wouldn't help filter - that would be done with VBA - but it
would
be
a
means of storing calendar information locally instead of
having
to
retrieve
it each time. That is the reason for the original post - does
Outlook
store
retrieved Calendar info in some kind of cache or the pst or do
I
have
to
retrieve all calendar info for other users each time I want to
view
it?

:

How would that help to filter out old/unchanged items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

how about
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/OtlkCustInEntApp.asp ?




message
You could use the ICS (Incremental Change Synchronization)
API
for
that,
but it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi there,

If I write some code that returns all appointments for
Exchange
users
that have delegated reveiw permissions to me, how should
I
cache
the
info so that I only need to return appointment data that
has
been
modified since the last time I checked? I understand how
to
filter
out
older, unchanged data but I'm wondering if there is a way
that
outlook
cache's the older data and for how long? Alternatively,
could
I
store
that user's data in a local calendar folder or do I need
to
write
it
to
a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
Thanks, Dmitry. I will try setcolumns and I am trying out Redemption for the
first time right now!

Dmitry Streblechenko said:
Then you arae probably limited to OOM where you can just loop through all
the items in the folder. Outlook tries to be smart and not open the
appointment retrieved from teh MAPIFolder.Items collection unless it really
needs to. And it needs to open the appointment if teh requested property is
not cached. To make sure Outlook always caches the properties that you will
be accessing, use MAPIFolder.Items.SetColumns. Make sure you cache the
valuee of Items in a separate variablee rather than call MAPIFolder.Items
every time.
You might also want to look at the MAPITable object in Redemption - see
http://www.dimastr.com/redemption/mapitable.htm

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Tadwick said:
c# for an eventual VSTO solution (if possible)

Dmitry Streblechenko said:
MAPI tables is probably the fastest way. What language and API are you
using?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Dmitry,

Thanks for all the assistance with this issue.

ICS sounds more complicated than I can handle right now. If I am going
to
have to load the remote data just to compare to the local cache, then
that
seems to defeat the performance gains I was after.

What is the most efficient means of retrieving calendar data from
Exchange
Server?

Thanks, Tad

:

If you don't use the ICS, you can only load both the target and
destination
folders and figure out which items were deleted. You can of course
assume
that deletions are rare compared to inserts/modifications and avoid
processing deletions every time you sync, but still, there is no way
around
it, you need to load both folders to see which ones are gone.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

not sure, what do you suggest?

:

How about the deleted items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I would use something like.....

Set oItms = oFdr.Items.Restrict("[LastModificationTime] > 'jul 1,
2006'")

:

AFAIK other mailboxes are not cached. Only the primary mailbox
and
the
Favorites are cached if set so.
And to store the calendar information locally using your code,
wouldn't
you
need to first figure out which items were modified?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

It wouldn't help filter - that would be done with VBA - but it
would
be
a
means of storing calendar information locally instead of
having
to
retrieve
it each time. That is the reason for the original post - does
Outlook
store
retrieved Calendar info in some kind of cache or the pst or do
I
have
to
retrieve all calendar info for other users each time I want to
view
it?

:

How would that help to filter out old/unchanged items?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

how about
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/OtlkCustInEntApp.asp ?




message
You could use the ICS (Incremental Change Synchronization)
API
for
that,
but it is only available in Extended MAPI.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi there,

If I write some code that returns all appointments for
Exchange
users
that have delegated reveiw permissions to me, how should
I
cache
the
info so that I only need to return appointment data that
has
been
modified since the last time I checked? I understand how
to
filter
out
older, unchanged data but I'm wondering if there is a way
that
outlook
cache's the older data and for how long? Alternatively,
could
I
store
that user's data in a local calendar folder or do I need
to
write
it
to
a database or other local data store?

Assume Windows XP/Outlook 2003/Exchange 2003.

Thanks
 
Back
Top