Class PropertyCacheFile


  • public final class PropertyCacheFile
    extends Object
    This class maintains a persistent(on file-system) store of the files that have checked ok(no validation events) and their associated timestamp. It is used to optimize Checkstyle between few launches. It is mostly useful for plugin and extensions of Checkstyle. It uses a property file for storage. A hashcode of the Configuration is stored in the cache file to ensure the cache is invalidated when the configuration has changed.
    • Field Detail

      • CONFIG_HASH_KEY

        public static final String CONFIG_HASH_KEY
        The property key to use for storing the hashcode of the configuration. To avoid name clashes with the files that are checked the key is chosen in such a way that it cannot be a valid file name.
        See Also:
        Constant Field Values
      • EXTERNAL_RESOURCE_KEY_PREFIX

        public static final String EXTERNAL_RESOURCE_KEY_PREFIX
        The property prefix to use for storing the hashcode of an external resource. To avoid name clashes with the files that are checked the prefix is chosen in such a way that it cannot be a valid file name and makes it clear it is a resource.
        See Also:
        Constant Field Values
      • BUFFER

        private static final byte[] BUFFER
        Default buffer for reading from streams.