<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Darknet](./bitburner.darknet.md) &gt; [openCache](./bitburner.darknet.opencache.md)

## Darknet.openCache() method

Opens a .cache file on the current server to acquire its valuable contents.

**Signature:**

```typescript
openCache(filename: string, suppressToast?: boolean): CacheResult;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

filename


</td><td>

string


</td><td>

Name of the cache file to open.


</td></tr>
<tr><td>

suppressToast


</td><td>

boolean


</td><td>

_(Optional)_ Optional. If true, suppresses the toast notification that appears when opening a cache file. Defaults to false.


</td></tr>
</tbody></table>

**Returns:**

[CacheResult](./bitburner.cacheresult.md)

An object containing the contents of the cache, and the karma lost.

## Remarks

RAM cost: 2 GB

