Skip to content

Instantly share code, notes, and snippets.

View JRakhimov's full-sized avatar
👨‍💻
Coding...

Javokhir Rakhimov JRakhimov

👨‍💻
Coding...
View GitHub Profile
@ragokan
ragokan / prisma-cache.ts
Created June 7, 2022 21:35
Cache middlweware for prisma
import { Prisma } from "@prisma/client";
import Redis from "ioredis";
const mutationActions = ["create", "update", "delete", "deleteMany", "updateMany"];
const queryActions = ["findUnique", "findMany", "count"];
const allActions = [...mutationActions, ...queryActions];
export function cacheMiddleware(
redis: Redis,
cacheDuration = 100 // 100 seconds
@gokulkrishh
gokulkrishh / media-query.css
Last active April 22, 2025 04:29
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */