export class QueryCache {
constructor() {
this.entries = new Map();
}
getEntry(key) {
type Loader<T> = () => Promise<T>;
interface Entry<T> {
value: T;
expiresAt: number;
}
use std::collections::HashSet;
use std::hash::Hash;
pub struct DedupByKey<I, K, F> {
inner: I,
key_fn: F,
import { Queue } from "bullmq";
import { createHash } from "crypto";
export const connection = { host: "127.0.0.1", port: 6379 };
export interface ChargePayload {
package pricecache
import (
"context"
"sync"
import asyncio
from typing import Awaitable, Callable, Dict, TypeVar
T = TypeVar("T")
mod chunker;mod parallel_hash;
use parallel_hash::{hash_buffer, root_hash};
const CHUNK_SIZE: usize = 64 * 1024;