DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.schema.mof

/*
**Description**
 
This resource is used to configure the Blob Cache settings for a web application.
 
Important:
This resource only configures the local server.
It changes the web.config file directly and is NOT using the SPWebConfigModifications class.
In order to configure all WFE servers in the farm, you have to apply this resource to all servers.
 
Note:
- In order to prevent inconsistancy between different web front end servers, make sure you configure this setting on all servers equally.
- If the specified folder does not exist, the resource will create the folder.
 
Best practice:
Specify a directory that is not on the same drive as where either the server operating system swap files or server log files are stored.
 
**Example**
 
    SPBlobCacheSettings BlobCacheSettings
    {
        WebAppUrl = "http://intranet.contoso.com"
        Zone = "Default"
        EnableCache = $true
        Location = "F:\BlobCache"
        MaxSizeInGB = 10
        FileTypes = "\.(gif|jpg|png|css|js)$"
        PsDscRunAsCredential = $InstallAccount
    }
*/
 
[ClassVersion("1.0.0.0"), FriendlyName("SPBlobCacheSettings")]
class MSFT_SPBlobCacheSettings : OMI_BaseResource
{
    [Key, Description("The URL of the web application")] string WebAppUrl;
    [Required, Description("The zone of the web application for which blob cache has to be configured"), ValueMap{"Default","Intranet","Internet","Custom","Extranet"}, Values{"Default","Intranet","Internet","Custom","Extranet"}] string Zone;
    [Required, Description("Specify if the blob cache has to be enabled")] Boolean EnableCache;
    [Write, Description("The location where the blob cache has to store its files")] string Location;
    [Write, Description("The maximum size (in GB) of disk space the blob cache is allowed to use")] Uint16 MaxSizeInGB;
    [Write, Description("The maximum age (in seconds) that a browser caches a blob")] Uint32 MaxAgeInSeconds;
    [Write, Description("Specify the file types that must be stored by the blob cache")] string FileTypes;
    [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount;
};