Class: pageCache

pageCache

new pageCache()

Page Caching machanism
Source:

Methods

getCacheKey(pageAJAX, filterArray) → {string}

Return a cache key for a given pageAJAX
Parameters:
Name Type Description
pageAJAX object the current ajax request for a page
filterArray object an optional array of parameters not to take into account
Source:
Returns:
cache key for the current page
Type
string

getPage(pageAJAX) → {object}

Return a cached page if it has already been loaded
Parameters:
Name Type Description
pageAJAX object the prepared ajax request of the page
Source:
Returns:
the cache object of the page
Type
object

isPageLoading(pageAJAX) → {boolean}

checks if a page status uns 'loading'
Parameters:
Name Type Description
pageAJAX object the prepared ajax request for the page
Source:
Returns:
true if loading
Type
boolean

page(pageNr, body, pageStyle) → {object}

Create a new page object that can be set as a cache object
Parameters:
Name Type Description
pageNr string the number of the page or subreport page
body string the full, rendered body of the page
pageStyle string the full, rendered style of the page
Source:
Returns:
a page
Type
object

pageCSSID() → {string}

The unique ID of the page style, prefixed
Source:
Returns:
the ID of the page css
Type
string

pageCurrent() → {string}

returns the page number if it is the current page.
Source:
Returns:
page number
Type
string

pageStyle() → {string}

Stripped down version of the CSS
Source:
Returns:
CSS of the page
Type
string

setPage(pageAJAX, page) → {object}

Set a loaded page for a given ajax request
Parameters:
Name Type Description
pageAJAX object the prepared ajax request for the page
page object the page (full HTML) of the request
Source:
Returns:
the page again
Type
object

setPageLoading(pageAJAX)

Sets the status of a page to 'loading'
Parameters:
Name Type Description
pageAJAX object the prepared ajax request for the page
Source: