diff --git a/src/pages/student-dashboard/StudentDashboardPage.tsx b/src/pages/student-dashboard/StudentDashboardPage.tsx index 65a84fe..5a6618f 100644 --- a/src/pages/student-dashboard/StudentDashboardPage.tsx +++ b/src/pages/student-dashboard/StudentDashboardPage.tsx @@ -234,8 +234,8 @@ export function StudentDashboardPage() { - {/* Métricas */} -
+ {/* Métricas Principais */} +
@@ -285,7 +285,7 @@ export function StudentDashboardPage() {
- {/* Métricas de Leitura */} + {/* Métricas Detalhadas */}

Métricas Detalhadas de Leitura

@@ -293,10 +293,13 @@ export function StudentDashboardPage() { className="text-gray-400 hover:text-gray-600 cursor-help transition-colors" title="Estas métricas são calculadas com base em todas as suas gravações de leitura, fornecendo uma visão detalhada do seu progresso" > +
-
-
+ +
+ {/* Pronúncia */} +
@@ -316,7 +319,8 @@ export function StudentDashboardPage() {
-
+ {/* Precisão */} +
@@ -336,7 +340,8 @@ export function StudentDashboardPage() {
-
+ {/* Compreensão */} +
@@ -356,7 +361,8 @@ export function StudentDashboardPage() {
-
+ {/* Velocidade */} +
@@ -376,7 +382,8 @@ export function StudentDashboardPage() {
-
+ {/* Pausas */} +
@@ -396,7 +403,8 @@ export function StudentDashboardPage() {
-
+ {/* Erros */} +
diff --git a/src/utils/cache.ts b/src/utils/cache.ts new file mode 100644 index 0000000..6dd0065 --- /dev/null +++ b/src/utils/cache.ts @@ -0,0 +1,17 @@ +import { getFromCache, setInCache, invalidateCache } from '../lib/redis'; + +const CACHE_TTL = 300; // 5 minutos em segundos + +export const cacheUtils = { + async get(key: string): Promise { + return getFromCache(key); + }, + + async set(key: string, value: T): Promise { + return setInCache(key, value, CACHE_TTL); + }, + + async del(key: string): Promise { + return invalidateCache(key); + } +}; \ No newline at end of file