org.apache.pdfbox.pdmodel

## Class ResourceCacheFactory

- java.lang.Object
- - org.apache.pdfbox.pdmodel.ResourceCacheFactory

    public class ResourceCacheFactory
    extends Object

Factory which provides a function to create an instance of a ResourceCache to be used to cache resources while processing a pdf. A DefaultResourceCache is used as default implementation. I can be replaced with an individual implementation. Setting the function to null disables the cache.

### Constructor Summary

Constructors
Constructor and Description
`ResourceCacheFactory()`

### Method Summary

All Methods Static Methods Concrete Methods
`static ResourceCache` `createResourceCache()` Create an instance of a resource cache using the provided function.
`static ResourceCacheCreateFunction` `getResourceCacheCreateFunction()` Get the current function to be used to create an instance of a resource cache.
`static void` `setResourceCacheCreateFunction(ResourceCacheCreateFunction function)` Use the given function to create an instance of a resource cache.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ResourceCacheFactory

    public ResourceCacheFactory()

### Method Detail

#### setResourceCacheCreateFunction

    public static void setResourceCacheCreateFunction(ResourceCacheCreateFunction function)

Use the given function to create an instance of a resource cache. Caching is disabled if a null value is provided.

#### getResourceCacheCreateFunction

    public static ResourceCacheCreateFunction getResourceCacheCreateFunction()

Get the current function to be used to create an instance of a resource cache.

Returns:
  the current function or null.

#### createResourceCache

    public static ResourceCache createResourceCache()

Create an instance of a resource cache using the provided function. Returns null if the function is set to null.

Returns:
  an instance of a resource cache.