getKeys method
Returns a list of all keys in the cache.
Throws a CacheException if there is an error retrieving the keys.
The limit
and offset
parameters can be used to paginate the results.
Implementation
@override
Future<List<String>> getKeys({int? limit, int? offset}) async {
final db = await database;
final result = await db.query(
'cache',
columns: ['key'],
limit: limit,
offset: offset,
);
return result.map((e) => e['key'] as String).toList();
}