fix: lint warnings
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
vi,
|
||||
} from 'vitest';
|
||||
import {
|
||||
type CacheItemInternalState,
|
||||
type CacheOptions,
|
||||
createCollectionCache,
|
||||
} from './collectionCache';
|
||||
@@ -152,7 +151,7 @@ describe('createCollectionCache', () => {
|
||||
|
||||
it('resets cache statistics', () => {
|
||||
cache.set('key1', 100); // This increments hits
|
||||
const statsBefore = cache.getStats();
|
||||
const _statsBefore = cache.getStats();
|
||||
|
||||
cache.clear();
|
||||
const statsAfter = cache.getStats();
|
||||
|
||||
@@ -130,8 +130,8 @@ export interface CollectionCacheManager<T> {
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export function createCollectionCache<T>(options: CacheOptions = {}): CollectionCacheManager<T> {
|
||||
const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
|
||||
export function createCollectionCache<T>(_options: CacheOptions = {}): CollectionCacheManager<T> {
|
||||
// const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
|
||||
|
||||
// Stores for reactive data
|
||||
const data: Writable<Record<string, T>> = writable({});
|
||||
@@ -201,7 +201,7 @@ export function createCollectionCache<T>(options: CacheOptions = {}): Collection
|
||||
* Set data in cache
|
||||
* Marks entry as ready and stops fetching state
|
||||
*/
|
||||
set: (key: string, value: T, ttl?: number) => {
|
||||
set: (key: string, value: T, _ttl?: number) => {
|
||||
data.update(d => ({
|
||||
...d,
|
||||
[key]: value,
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
type Filter,
|
||||
type Property,
|
||||
createFilter,
|
||||
} from '$shared/lib';
|
||||
import { createFilter } from '$shared/lib';
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
|
||||
Reference in New Issue
Block a user