---
title: "PrefetchRequest"
description: "A request for prefetch which can be submitted to a [PrefetchScheduler] to execute during idle
time."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Customization of PrefetchScheduler is no longer supported. LazyLayout will attach an appropriate scheduler internally. If you needed to customize it please file a Feature Request.


```kotlin
@ExperimentalFoundationApi
sealed interface PrefetchRequest
```


A request for prefetch which can be submitted to a `PrefetchScheduler` to execute during idle
time.


## Functions

```kotlin
fun PrefetchRequestScope.execute(): Boolean
```


Gives this request a chance to execute work. It should only do work if it thinks it can
finish it within `PrefetchRequestScope.availableTimeNanos`.

#### Returns

| | |
| --- | --- |
|  | whether this request has more work it wants to do, but ran out of time. `true` indicates this request wants to have `execute` called again to do more work, while `false` indicates its work is complete. |




