---
title: "FileCache..::.GetPublicTempFileName Method (String)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_AjaxControls_FileCache_GetPublicTempFileName_1_bb3a7a4f.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# FileCache.GetPublicTempFileName Method (String)
 
Generates an unique temporary file name for the public cache.
 
**Namespace:** [Aurigma.GraphicsMill.AjaxControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_AjaxControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.AjaxControls (in Aurigma.GraphicsMill.AjaxControls.dll)
 
## Syntax
  
```
Public Function GetPublicTempFileName ( _extension As String _
) As String
```
 
```csharp
public string GetPublicTempFileName(string extension
)
```
 
### Parameters
 
 - extension
     - Type: [System.String](http://msdn2.microsoft.com/en-us/s1wwdcbf)
An extension to append to the generated file name.
 
### Return Value
An unique name of the temporary file in the public cache (without full path).
 
## Remarks
  
Note, this method does not create a file with generated name. It just returns a name of the file which is guarantied unique in the public cache folder. You should create this file manually.
 
To get a full physical path to the public cache, use the [GetAbsolutePublicCachePath(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_AjaxControls_FileCache_GetAbsolutePublicCachePath_1_bb3a7a4f.htm.md) method. If you need to get an URL to this file (so that this file could be loaded into the browser), use the [GetRelativePublicCachePath(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_AjaxControls_FileCache_GetRelativePublicCachePath_1_bb3a7a4f.htm.md) method.
   
## See Also

### Reference

- [FileCache Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_AjaxControls_FileCache.htm.md)
- [GetPublicTempFileName Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_AjaxControls_FileCache_GetPublicTempFileName.htm.md)
- [Aurigma.GraphicsMill.AjaxControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_AjaxControls.htm.md)
