PHP 클래스 SizeRestrictedPackageCache

상속: implements PackageCache
파일 보기 프로젝트 열기: silverstripe/deploynaut

보호된 프로퍼티들

프로퍼티 타입 설명
$baseDir
$cacheSize

공개 메소드들

메소드 설명
getPackageFilename ( PackageGenerator $generator, string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string Return the filename of the generated package, retrieving from cache or generating as necessary
setBaseDir ( string $baseDir ) The base directory to store cached packages in.
setCacheSize ( integer $cacheSize ) Set the maximum number of items that will be stored in the package cache.

보호된 메소드들

메소드 설명
reduceDirSizeTo ( string $dir, integer $count, DeploynautLogFile $log ) Delete items in this directory until the number of items is <= $count.
sanitiseDirName ( string $identifier ) Take the identifier an make it safe to use as a directory name.

메소드 상세

getPackageFilename() 공개 메소드

Return the filename of the generated package, retrieving from cache or generating as necessary
public getPackageFilename ( PackageGenerator $generator, string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string
$generator PackageGenerator The generator to use to create cache entries.
$identifier string A unique identifier for the generator; used to partition the cache
$sha string The SHA of the commit to be deployed
$repositoryDir string The directory where the repository resides
$log DeploynautLogFile The log to write status output to, including package-generation commands
리턴 string

reduceDirSizeTo() 보호된 메소드

Delete the oldest files first.
protected reduceDirSizeTo ( string $dir, integer $count, DeploynautLogFile $log )
$dir string The directory to remove items from
$count integer The maximum number of .tar.gz files that can appear in that directory
$log DeploynautLogFile The log to send removal status messages to

sanitiseDirName() 보호된 메소드

Take the identifier an make it safe to use as a directory name.
protected sanitiseDirName ( string $identifier )
$identifier string The unsanitised directory name.

setBaseDir() 공개 메소드

The files will be stored in a subdirectory named after the identifier. If base directory isn't set, the getPackageFilename() won't run.
public setBaseDir ( string $baseDir )
$baseDir string The base directory

setCacheSize() 공개 메소드

If null, items will never be deleted. If set, cache entries will be touched whenever they are accessed, and the least-recently-access items will be deleted.
public setCacheSize ( integer $cacheSize )
$cacheSize integer the number of package files to keep.

프로퍼티 상세

$baseDir 보호되어 있는 프로퍼티

protected $baseDir

$cacheSize 보호되어 있는 프로퍼티

protected $cacheSize