1. A method comprising: receiving an initialization request to create or extend a file, wherein the initialization request comprises or identifies file template metadata comprising a template that describes at least a non-zero portion of a blank file; allocating a set of allocation units comprising at least one allocation unit for the file on a primary storage medium without initializing at least a portion of the file on the primary storage medium; storing the file template metadata in at least one of a volatile memory cache and a persistent memory cache; receiving a second request corresponding to a particular allocation unit of the set of allocation units; obtaining particular file template metadata associated with the particular allocation unit; and in response to the second request, generating at least a portion of the particular allocation unit based on the template; wherein the method is performed by one or more computing devices.