Documentation
¶
Overview ¶
Package crl provides functionalities for crl revocation check.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileCache ¶
type FileCache struct {
// contains filtered or unexported fields
}
FileCache implements corecrl.Cache.
Key: url of the CRL.
Value: corecrl.Bundle.
This cache builds on top of the UNIX file system to leverage the file system's atomic operations. The `rename` and `remove` operations will unlink the old file but keep the inode and file descriptor for existing processes to access the file. The old inode will be dereferenced when all processes close the old file descriptor. Additionally, the operations are proven to be atomic on UNIX-like platforms, so there is no need to handle file locking.
NOTE: For Windows, the `open`, `rename` and `remove` operations need file locking to ensure atomicity. The current implementation does not handle file locking, so the concurrent write from multiple processes may be failed. Please do not use this cache in a multi-process environment on Windows.
func NewFileCache ¶
NewFileCache creates a FileCache with root as the root directory
An example for root is `dir.CacheFS().SysPath(dir.PathCRLCache)`