Article | 60000422 |
Type | Wish |
Product | Engine |
Version | 6010 |
Date Added | 2/18/2008 12:00:00 AM |
Fixed | (2/19/2008 12:00:00 AM) |
Submitted by | Maria del Mar Tenreiro |
Summary
A new property in order to control how a url opening file is using the internet cache.
Solution
In version 6011 a new property was added in VectorDraw.Professional.vdObjects.vdFileProperties :
The property CacheLevel which is an interger with value range 0 to 6 :
Gets or sets the cache policy when opening a drawing from a url.Not saved with drawing.
vaid values:
0 :NoCache ,No entries are taken from caches, added to caches, or removed from caches between the client and server
1 :BypassCache ,Satisfies a request by using the server. No entries are taken from caches,
added to caches, or removed from caches between the client and server.
2 :CacheOnly ,Satisfies a request using the locally cached resource; does not send a request
for an item that is not in the cache.
3 :CacheIfAvailable ,Satisfies a request for a resource from the cache, if the resource is available;
otherwise, sends a request for a resource to the server. If the requested
item is available in any cache between the client and the server, the request
might be satisfied by the intermediate cache.
4 :Revalidate ,Satisfies a request by using the cached copy of the resource if the timestamp
is the same as the timestamp of the resource on the server; otherwise, the
resource is downloaded from the server, presented to the caller, and stored
in the cache.
5 :Reload ,Satisfies a request by using the server. The response might be saved in the
cache. In the HTTP caching protocol, this is achieved using the no-cache
cache control directive and the no-cache Pragma header.
6 :NoCacheNoStore ,Never satisfies a request by using resources from the cache and does not
cache resources. If the resource is present in the local cache, it is removed.
default value = 3
Example:
//Manage C# .NET using VectorDraw.Professional.dll
doc.FileProperties.CacheLevel = 5;
doc.Open("http://www.mywebsite.com/test/mydrawing.vdcl");
//VB script using vdraw.ocx wrapper component
vdraw.ActiveDocument.WrapperObject.FileProperties.CacheLevel = 5
vdraw.ActiveDocument.Open "http://www.mywebsite.com/test/mydrawing.vdcl"
In a VB6 the VectorDraw.Professional.tlb need to be added in references.