C# Class ScrewTurn.Wiki.CacheProvider

Implements a local cache provider. All instance members are thread-safe.
Inheritance: ICacheProviderV30
Mostra file Open project: mono/ScrewTurnWiki Class Usage Examples

Public Methods

Method Description
AddRedirection ( string source, string destination ) : void

Adds the redirection information for a page (overwrites the previous value, if any).

CancelEditingSession ( string page, string user ) : void

Cancels an editing session.

ClearPageContentCache ( ) : void

Clears the Page Content cache.

ClearPseudoCache ( ) : void

Clears the Pseudo-Cache.

ClearRedirections ( ) : void

Clears all the redirections information.

CutCache ( int cutSize ) : void

Reduces the size of the Page Content cache, removing the least-recently used items.

GetFormattedPageContent ( System.PageInfo pageInfo ) : string

Gets the partially-formatted content (text) of a Page, previously stored in the cache.

GetPageContent ( System.PageInfo pageInfo ) : PageContent

Gets the Content of a Page, previously stored in cache.

GetPseudoCacheValue ( string name ) : string

Gets the value of a Pseudo-cache item, previously stored in the cache.

GetRedirectionDestination ( string source ) : string

Gets the destination of a redirection.

Init ( IHostV30 host, string config ) : void

Initializes the Storage Provider.

IsPageBeingEdited ( string page, string currentUser ) : bool

Finds whether a Page is being edited by a different user.

RemovePage ( System.PageInfo pageInfo ) : void

Removes a Page from the cache.

RemovePageFromRedirections ( string name ) : void

Removes a pge from both sources and destinations.

RenewEditingSession ( string page, string user ) : void

Adds or updates an editing session.

SetFormattedPageContent ( System.PageInfo pageInfo, string content ) : void

Sets the partially-preformatted content (text) of a Page.

SetPageContent ( System.PageInfo pageInfo, PageContent content ) : void

Sets the Content of a Page.

SetPseudoCacheValue ( string name, string value ) : void

Sets the value of a Pseudo-cache item.

Shutdown ( ) : void

Method invoked on shutdown.

This method might not be invoked in some cases.

WhosEditing ( string page ) : string

Gets the username of the user who's editing a page.

Method Details

AddRedirection() public method

Adds the redirection information for a page (overwrites the previous value, if any).
If source or destination are null. If source or destination are empty.
public AddRedirection ( string source, string destination ) : void
source string The source page.
destination string The destination page.
return void

CancelEditingSession() public method

Cancels an editing session.
If page or user are null. If page or user are empty.
public CancelEditingSession ( string page, string user ) : void
page string The Page.
user string The User.
return void

ClearPageContentCache() public method

Clears the Page Content cache.
public ClearPageContentCache ( ) : void
return void

ClearPseudoCache() public method

Clears the Pseudo-Cache.
public ClearPseudoCache ( ) : void
return void

ClearRedirections() public method

Clears all the redirections information.
public ClearRedirections ( ) : void
return void

CutCache() public method

Reduces the size of the Page Content cache, removing the least-recently used items.
If cutSize is less than or equal to zero.
public CutCache ( int cutSize ) : void
cutSize int The number of Pages to remove.
return void

GetFormattedPageContent() public method

Gets the partially-formatted content (text) of a Page, previously stored in the cache.
If pageInfo is null.
public GetFormattedPageContent ( System.PageInfo pageInfo ) : string
pageInfo System.PageInfo The Page Info object related to the content being requested.
return string

GetPageContent() public method

Gets the Content of a Page, previously stored in cache.
If pageInfo is null.
public GetPageContent ( System.PageInfo pageInfo ) : PageContent
pageInfo System.PageInfo The Page Info object related to the Content being requested.
return ScrewTurn.Wiki.PluginFramework.PageContent

GetPseudoCacheValue() public method

Gets the value of a Pseudo-cache item, previously stored in the cache.
If name is null. If name is empty.
public GetPseudoCacheValue ( string name ) : string
name string The name of the item being requested.
return string

GetRedirectionDestination() public method

Gets the destination of a redirection.
If source is null. If source is empty.
public GetRedirectionDestination ( string source ) : string
source string The source page.
return string

Init() public method

Initializes the Storage Provider.
If host or config are null. If config is not valid or is incorrect.
public Init ( IHostV30 host, string config ) : void
host IHostV30 The Host of the Component.
config string The Configuration data, if any.
return void

IsPageBeingEdited() public method

Finds whether a Page is being edited by a different user.
If page or currentUser are null. If page or currentUser are empty.
public IsPageBeingEdited ( string page, string currentUser ) : bool
page string The Page.
currentUser string The User who is requesting the status of the Page.
return bool

RemovePage() public method

Removes a Page from the cache.
If pageInfo is null.
public RemovePage ( System.PageInfo pageInfo ) : void
pageInfo System.PageInfo The Page Info object related to the Page that has to be removed.
return void

RemovePageFromRedirections() public method

Removes a pge from both sources and destinations.
If name is null. If name is empty.
public RemovePageFromRedirections ( string name ) : void
name string The name of the page.
return void

RenewEditingSession() public method

Adds or updates an editing session.
If page or user are null. If page or user are empty.
public RenewEditingSession ( string page, string user ) : void
page string The edited Page.
user string The User who is editing the Page.
return void

SetFormattedPageContent() public method

Sets the partially-preformatted content (text) of a Page.
If pageInfo or content are null.
public SetFormattedPageContent ( System.PageInfo pageInfo, string content ) : void
pageInfo System.PageInfo The Page Info object related to the content being stored.
content string The partially-preformatted content.
return void

SetPageContent() public method

Sets the Content of a Page.
If pageInfo or content are null.
public SetPageContent ( System.PageInfo pageInfo, PageContent content ) : void
pageInfo System.PageInfo The Page Info object related to the Content being stored.
content ScrewTurn.Wiki.PluginFramework.PageContent The Content of the Page.
return void

SetPseudoCacheValue() public method

Sets the value of a Pseudo-cache item.
If name is null. If name is empty.
public SetPseudoCacheValue ( string name, string value ) : void
name string The name of the item being stored.
value string The value of the item. If the value is null, then the item should be removed from the cache.
return void

Shutdown() public method

Method invoked on shutdown.
This method might not be invoked in some cases.
public Shutdown ( ) : void
return void

WhosEditing() public method

Gets the username of the user who's editing a page.
If page is null. If page is empty.
public WhosEditing ( string page ) : string
page string The page.
return string