---
lang: en
title: 'API docs: context.contextview.once_3'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.contextview.once_3.html
---

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

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ContextView](./context.contextview.md) &gt; [once](./context.contextview.once_3.md)

## ContextView.once() method

The "resolve" event is emitted when the cached values are resolved and updated.

<b>Signature:</b>

```typescript
once(eventName: 'refresh', listener: <T>(result: T[]) => void): this;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  eventName | 'refresh' | The name of the event - always <code>refresh</code>. |
|  listener | &lt;T&gt;(result: T\[\]) =&gt; void | The listener function to call when the event is emitted. |

<b>Returns:</b>

this


