Server
[ class tree: Server ] [ index: Server ] [ all elements ]

Class: MapResultCache

Source Location: /server/MapResultCache.php

Class Overview


Class to manage the caching of the MapResults.


Author(s):

Variables

Methods



Class Details

[line 32]
Class to manage the caching of the MapResults.

Cache cleaning is done by images cache cleaning script.




Tags:

author:  Yves Bolognini <yves.bolognini@camptocamp.com>


[ Top ]


Class Variables

$cartoserver =

[line 42]



Tags:

access:  private

Type:   Cartoserver


[ Top ]

$log =

[line 37]



Tags:

access:  private

Type:   Logger


[ Top ]

$mapResultFile =

[line 47]



Tags:

access:  private

Type:   string


[ Top ]

$skipCaching =  false

[line 53]

True if the the last mapResult should not be cached.



Tags:

access:  private

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 59]

MapResultCache __construct( CartoServer $cartoserver)

Constructor



Tags:

access:  public


Parameters:

Cartoserver   $cartoserver  

[ Top ]

method cacheMapResult [line 113]

MapResult cacheMapResult( MapRequest $mapRequest)

Saves map result in cache file.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method getDigest [line 70]

string getDigest( MapRequest $mapRequest)

Returns MD5 of serialized map request.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method getMap [line 180]

MapResult getMap( MapRequest $mapRequest)

Retrieved map result.

If cache is OFF: computes map result. If cache is ON and first call: computes map result and prepares caching for a possible second call. If cache is ON and second call: computes map result and caches it. If cache is ON and Nth call (N > 2): return cached map result.




Tags:

access:  public


Parameters:

MapRequest   $mapRequest  

[ Top ]

method getMapResultFile [line 89]

string getMapResultFile( MapRequest $mapRequest)

Returns map result cache file location.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method getMapResultFromServer [line 79]

MapResult getMapResultFromServer( MapRequest $mapRequest)



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method readMapResult [line 135]

MapResult readMapResult( MapRequest $mapRequest)

Reads map result from cache file.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method setSkipCaching [line 104]

void setSkipCaching( mixed $skipCaching)

Sets the skipCaching variable, which will skip the cache of the mapResult if skipCaching is true.

It can be used not to put error messages in cache.




Tags:

access:  public


[ Top ]

method skipCache [line 150]

boolean skipCache( MapRequest $mapRequest)

Tells if map result caching is deactivated.



Tags:

return:  true => cache is OFF
access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]


Documentation generated on Wed, 6 Apr 2005 12:06:48 +0200 by phpDocumentor 1.3.0RC3