# `GSFont resetCache`

*Instance Method*

Invalidates the glyph name and identifier lookup caches.

## Declaration

```swift
func resetCache()
```

```objc
- (void) resetCache;
```

```python
resetCache()
```

## Discussion

Call this after direct glyph collection changes that bypass the glyph mutation methods.

## See Also

### Glyph Ordering and Caches

- [`GSFont.keepAlternatesTogether`](/Core/GlyphsCore/GSFont/keepAlternatesTogether) — Keeps alternate glyphs next to their base glyph when sorting glyphs.
- [`GSFont sortGlyphs`](/Core/GlyphsCore/GSFont/sortGlyphs) — Sorts the font’s glyphs using the font glyph order and glyph metadata.
- [`GSFont sortGlyphs:withList:`](/Core/GlyphsCore/GSFont/sortGlyphs:withList:) — Sorts a mutable glyph array using a glyph-name order list and glyph metadata.

