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 ]

$skipCaching =  false

[line 48]

True if the the last mapResult should not be cached.



Tags:

access:  private

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 54]

MapResultCache __construct( CartoServer $cartoserver)

Constructor



Tags:

access:  public


Parameters:

Cartoserver   $cartoserver  

[ Top ]

method cacheMapResult [line 105]

MapResult cacheMapResult( MapRequest $mapRequest)

Saves map result in cache file.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method getDigest [line 65]

string getDigest( MapRequest $mapRequest)

Returns MD5 of serialized map request.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method getMap [line 172]

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 84]

string getMapResultFile( MapRequest $mapRequest)

Returns map result cache file location.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method getMapResultFromServer [line 74]

MapResult getMapResultFromServer( MapRequest $mapRequest)



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method readMapResult [line 127]

MapResult readMapResult( MapRequest $mapRequest)

Reads map result from cache file.



Tags:

access:  private


Parameters:

MapRequest   $mapRequest  

[ Top ]

method setSkipCaching [line 96]

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 142]

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 Fri, 21 Sep 2007 13:30:54 +0200 by phpDocumentor 1.3.0RC3