How it works
Task.FromResult creates a successfully completed task containing an already available result. It is useful when an interface returns Task<T> but one implementation can answer from memory. There is no need for a timer, Task.Run, or an async state machine just to wrap a constant result. The caller can use await regardless of whether this particular task completes synchronously. That consistency helps when a later implementation genuinely waits for input.
Do not use a completed task to claim that expensive synchronous calculation became nonblocking: the calculation still runs before the method returns if it is performed while constructing the result.
Change the helper to read a value from a dictionary before returning it. Identify which work happens synchronously and which part, if any, actually needs asynchronous waiting.
A working example
using System;
using System.Linq;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
var result = await CachedCountAsync();
Console.WriteLine(result);
Task<int> CachedCountAsync() => Task.FromResult(12);
Expected output
12
Already available data can be represented by a completed task.