User Tools

Site Tools


thinkgeo.mapsuite.mvcedition.clientcache

This is an old revision of the document!


ThinkGeo.MapSuite.MvcEdition.ClientCache

<!– Class –> This class controls how the map images are cached by the browser.

Remarks

The ClientCache class controls whether the map images will be cached by the browser. Setting the <strong>CacheId</strong> will enable the browser to cache the map images.

The <strong>CacheId</strong> string will be appended to the URL of the image. The browser uses the URL as the key to retrieve a cached image. Thus, you can make the browser cache different images by setting the <strong>CacheId</strong> to different values. For example, you can set a different CacheId for requests with different parameters and the browser will cache the different images for those requests.

The <strong>Duration</strong> defines the length of time that the images will remain in the browser cache. After that time, the image will then be requested from the server.

Inheritance Hierarchy

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodClientCache Initializes a new instance of the ClientCache class.
Public MethodClientCache TimeSpan Initializes a new instance of the ClientCache class with the specified expiration time.
Public MethodClientCache TimeSpan, String Initializes a new instance of the ClientCache class with the specified expiration time and cacheId string.

Protected Constructors

Name Parameters DeclaringType Summary

Public Methods

Name Parameters DeclaringType Summary
Public MethodEquals Object Object
Public MethodFromJson String Load this object from a json string.
Public MethodGetHashCode Object
Public MethodGetType Object
Public MethodToJson Returns a JSON string containing the CacheId that will be part of the request string.
Public MethodToString Object

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodFinalize Object
Protected MethodMemberwiseClone Object

Public Properties

Name Return DeclaringType Summary
Public PropertyCacheId String Gets or sets a string that enables the browser to cache images, and which is also part of the key for the browser to distinguish between each cached image.
Public PropertyDuration TimeSpan Gets or sets the expiration time of the images in the browser cache.

Protected Properties

Name Return DeclaringType Summary

Public Events

Name Event Arguments DeclaringType Summary

Public Constructors

ClientCache()

Initializes a new instance of the ClientCache class.

Overloads

Initializes a new instance of the ClientCache class.

Parameters

Name Type Description

Go Back

ClientCache(TimeSpan)

Initializes a new instance of the ClientCache class with the specified expiration time.

Overloads

Initializes a new instance of the ClientCache class.

Parameters

Name Type Description
duration TimeSpan<!– System.TimeSpan –> The amount of the time that the cached images are to remain in the browser cache.

Go Back

ClientCache(TimeSpan, String)

Initializes a new instance of the ClientCache class with the specified expiration time and cacheId string.

Overloads

Initializes a new instance of the ClientCache class.

Parameters

Name Type Description
duration TimeSpan<!– System.TimeSpan –> The amount of the time that the cached images are to remain in the browser cache.
cacheId String<!– System.String –> A string that the browser uses to retrieve a cached image.

Go Back

Protected Constructors

Public Methods

Equals(Object)

Return Value

Return Type Description
Boolean<!– System.Boolean –>

Parameters

Name Type Description
obj Object<!– System.Object –>

<!– System.Object –> Go Back

FromJson(String)

Load this object from a json string.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
jsonString String<!– System.String –> a json string

<!– ThinkGeo.MapSuite.MvcEdition.ClientCache –> Go Back

GetHashCode()

Return Value

Return Type Description
Int32<!– System.Int32 –>

Parameters

Name Type Description

<!– System.Object –> Go Back

GetType()

Return Value

Return Type Description
Type<!– System.Type –>

Parameters

Name Type Description

<!– System.Object –> Go Back

ToJson()

Returns a JSON string containing the CacheId that will be part of the request string.

Return Value

Return Type Description
String<!– System.String –> A JSON string that contains the CacheId.

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.MvcEdition.ClientCache –> Go Back

ToString()

Return Value

Return Type Description
String<!– System.String –>

Parameters

Name Type Description

<!– System.Object –> Go Back

Protected Methods

Finalize()

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– System.Object –> Go Back

MemberwiseClone()

Return Value

Return Type Description
Object<!– System.Object –>

Parameters

Name Type Description

<!– System.Object –> Go Back

Public Properties

CacheId

Gets or sets a string that enables the browser to cache images, and which is also part of the key for the browser to distinguish between each cached image.

Remarks

Setting the <strong>CacheId</strong> will enable the browser to cache the map images. The <strong>CacheId</strong> string will also be appended to the URL of the image. The browser uses the URL as the key to retrieve a cached image; thus, you can make the browser cache different images by setting the <strong>CacheId</strong> to different values. For example, you can set a different CacheId for requests with different parameters and the browser will cache the different images for those requests.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.MvcEdition.ClientCache –> Go Back

Duration

Gets or sets the expiration time of the images in the browser cache.

Remarks

The <strong>Duration</strong> indicates the length of time that images will remain in the browser cache before expiring. The default value is 7 day.

Return Value

Return Type
TimeSpan<!– System.TimeSpan –>

<!– ThinkGeo.MapSuite.MvcEdition.ClientCache –> Go Back

Protected Properties

Public Events

thinkgeo.mapsuite.mvcedition.clientcache.1440040131.txt.gz · Last modified: 2015/09/21 03:32 (external edit)