PurgeCSSPurgeCSS
API Reference
  • English
  • Français
GitHub
API Reference
  • English
  • Français
GitHub
  • PurgeCSS

    • About PurgeCSS
    • Getting Started
    • Configuration
    • Command Line Interface
    • Programmatic API
    • Safelisting
    • Extractors
  • Plugins

    • PostCSS
    • Webpack
    • Rollup
    • Gulp
    • Grunt
    • Gatsby
  • Guides

    • Vue
    • React
    • Angular
    • Next.js
    • Nuxt.js
    • Razzle
    • WordPress
    • Hugo
  • Comparison
  • Common Questions

    • How to use with CSS modules
    • How to use with Ant Design

Home > purgecss > ContentCache > set

ContentCache.set() method

Store the selectors of a file. The entry is removed when its selectors reject, or once they resolve when the file was modified or changed less than 2 seconds before ContentCacheEntry.checkedAt.

Signature:

set(filePath: string, entry: ContentCacheEntry): void;

Parameters

Parameter

Type

Description

filePath

string

path of the content file

entry

ContentCacheEntry

selectors of the file and what they were extracted from

Returns:

void