| name | canva-performance-tuning |
| description | Optimize Canva Connect API performance with caching, pagination, and connection pooling.
Use when experiencing slow API responses, implementing caching strategies,
or optimizing request throughput for Canva integrations.
Trigger with phrases like "canva performance", "optimize canva",
"canva latency", "canva caching", "canva slow", "canva pagination".
|
| allowed-tools | Read, Write, Edit |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","design","canva"] |
| compatibility | Designed for Claude Code |
Canva Performance Tuning
Overview
Optimize Canva Connect API performance. The REST API at api.canva.com/rest/v1/* has per-user rate limits and async operations (exports, uploads, autofills) that require polling.
Caching Strategy
Design Metadata Cache
import { LRUCache } from 'lru-cache';
const designCache = new LRUCache<string, any>({
max: 500,
ttl: 5 * 60 * 1000,
});
async function getDesignCached(designId: string, token: string) {
const cached = designCache.get(designId);
if (cached) return cached;
const data = await canvaAPI(`/designs/${designId}`, token);
designCache.set(designId, data);
return data;
}
Redis Cache for Distributed Systems
import Redis ;
redis = (process..);
cachedCanvaCall<T>(
: ,
: <T>,
ttlSeconds =
): <T> {
cached = redis.(key);
(cached) .(cached);
result = ();
redis.(key, ttlSeconds, .(result));
result;
}
templates = (
,
(, token),
);