## com.imcode.imcms.mapping
Class CachingDocumentGetter

    java.lang.Object
      com.imcode.imcms.mapping.DocumentGetterWrapper
          com.imcode.imcms.mapping.CachingDocumentGetter

All Implemented Interfaces:
  DocumentGetter

    public class CachingDocumentGetter

extends DocumentGetterWrapper

TODO: ??? add cache for custom versions ???

Constructor Summary
`CachingDocumentGetter(DocumentGetter documentGetter, int cacheSize)`

Method Summary
`void` `clearCache()`
`DocumentDomainObject` `getDocument(java.lang.Integer documentId)` Returns published version of a document.
`DocumentDomainObject` `getWorkingDocument(java.lang.Integer documentId)` Returns working version of a document.
`void` `removeDocumentFromCache(java.lang.Integer documentId)`
`DocumentDomainObject` `removePublishedDocumentFromCache(java.lang.Integer documentId)`
`DocumentDomainObject` `removeWorkingDocumentFromCache(java.lang.Integer documentId)`

Methods inherited from class com.imcode.imcms.mapping.DocumentGetterWrapper
`getDocument, getDocuments`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CachingDocumentGetter

    public CachingDocumentGetter(DocumentGetter documentGetter,
                                 int cacheSize)

Method Detail

### getDocument

    public DocumentDomainObject getDocument(java.lang.Integer documentId)

  Description copied from interface: `DocumentGetter`
  Returns published version of a document.

  Specified by:
    `getDocument` in interface `DocumentGetter`
  Overrides:
    `getDocument` in class `DocumentGetterWrapper`

### getWorkingDocument

    public DocumentDomainObject getWorkingDocument(java.lang.Integer documentId)

  Description copied from interface: `DocumentGetter`
  Returns working version of a document.

  Specified by:
    `getWorkingDocument` in interface `DocumentGetter`
  Overrides:
    `getWorkingDocument` in class `DocumentGetterWrapper`
  Parameters:
    `documentId` - document's id.

### clearCache

    public void clearCache()

### removeDocumentFromCache

    public void removeDocumentFromCache(java.lang.Integer documentId)

### removePublishedDocumentFromCache

    public DocumentDomainObject removePublishedDocumentFromCache(java.lang.Integer documentId)

### removeWorkingDocumentFromCache

    public DocumentDomainObject removeWorkingDocumentFromCache(java.lang.Integer documentId)