class DeployFlushDiscoverer implements FlushDiscoverer

Checks whether a filesystem resource has been changed since the manifest generation

For this discoverer to get activated you should define SS_FLUSH_ON_DEPLOY variable - if the environment variable SS_FLUSH_ON_DEPLOY undefined or false, then does nothing - if SS_FLUSH_ON_DEPLOY is true, then checks FILE modification time - otherwise takes {BASE_PATH/SS_FLUSH_ON_DEPLOY} as the resource to check

Examples:

  • SS_FLUSH_ON_DEPLOY="" would check the BASE_PATH folder for modifications (not the files within)
  • SS_FLUSH_ON_DEPLOY=true would check BASE_PATH/vendor/silverstripe/framework/src/Core/Startup/DeployFlushDiscoverer.php file modification
  • SS_FLUSH_ON_DEPLOY=false disable filesystem checks
  • SS_FLUSH_ON_DEPLOY="public/index.php" checks BASE_PATH/public/index.php file modification time

Methods

__construct(Kernel $kernel)

No description

null|bool
shouldFlush()

Returns true if the deploy timestamp greater than the cache generation timestamp

Details

at line 35
__construct(Kernel $kernel)

Parameters

Kernel $kernel

at line 103
null|bool shouldFlush()

Returns true if the deploy timestamp greater than the cache generation timestamp

{@inheritdoc}

Return Value

null|bool null if don't care or bool to force or prevent flush