## Resource properties

Resources have properties that can be used to store meta-information about the resource. Your plug-in can use these properties to hold information about a resource that is specific to your purpose. Resource properties are declared, accessed, and maintained by various plug-ins, and are not interpreted by the platform. When a resource is deleted from the workspace, its properties are also deleted.

There are two kinds of resource properties:

- Session properties allow your plug-ins to easily cache information about a resource in key-value pairs. The values are arbitrary objects. These properties are maintained in memory and lost when a resource is deleted from the workspace, or when the project or workspace is closed.
- Persistent properties are used to store resource-specific information on disk. The value of a persistent property is an arbitrary string. Your plug-in decides how to interpret the string. The strings are intended to be short (under 2KB). Persistent properties are stored on disk with the platform metadata and maintained across platform shutdown and restart.

If you follow the convention of qualifying property key names with the unique id of your plug-in, you won't have to worry about your property names colliding with those of other plug-ins.

If your plug-in needs to store persistent information about a project that is much larger than 2 KB, then these properties should be exposed as resources in their own right, rather than using the persistent properties API.

See IResource for a description of the API for getting and setting the different kinds of resource properties.