cache not appear

Ahmed Ali Al-Lawati 0 Reputation points
2025-11-16T15:56:28.7666667+00:00

we add new cache and it is serving traffic but it is not showing in the portal and the graph show 0 MB

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
{count} votes

1 answer

Sort by: Most helpful
  1. Jerald Felix 9,840 Reputation points
    2025-11-16T16:53:07.0533333+00:00

    Hello Ahmed Ali Al-Lawati,

    The new Azure Cache for Redis showing 0 MB in metrics and not appearing in the portal's cache overview despite serving traffic indicates a delay in metric indexing or a connection/monitoring configuration issue—new caches take 15-60 minutes to populate metrics after first data ingestion, and if the app isn't using the correct endpoint or auth, the portal won't register activity. Here's how to troubleshoot and fix:

    Quick Troubleshooting Steps

    1. Verify Cache Configuration and Connection:
      • Portal > Your Cache > Overview > Check Status: "Running". Copy Connection string (Access keys > Primary) and test connectivity from your app/code:
        
             // Example in C# with StackExchange.Redis
        
             var config = "your-cache.redis.cache.windows.net:6380,password=your-key,ssl=True,abortConnect=False";
        
             var connection = ConnectionMultiplexer.Connect(config);
        
             var db = connection.GetDatabase();
        
             db.StringSet("test-key", "test-value");
        
             var value = db.StringGet("test-key");  // Should return "test-value"
        
        
        • If fails: Check Firewall (Networking > Firewall > Allow public access or add client IP). Ensure SSL=True for Basic/Standard tiers.
      • App-side: Confirm using host yourcache.redis.cache.windows.net:6380 (not localhost), and no port 6379 (TLS required).
    2. Check Metrics and Indexing Delay:
      • Cache > Monitoring > Metrics > Select "Cache Memory Used" > Time range: Last 1 hour > Aggregation: Average.
        • If 0: Wait 30 mins post-first write; new caches initialize metrics gradually.
      • Cache Hits/Misses: If 0 despite traffic, no reads/writes hitting cache—log app calls to verify (e.g., add ILogger: "Cache hit for key X").
      • Insights tab: Enable "Cache insights" if Premium tier (shows connected clients >0).
    3. Fix Portal Visibility:
      • Refresh portal (F5 or sign out/in); sometimes UI caches old state.
      • Multiple caches: Search "Cache for Redis" in All resources—if not listed, recreate (rare resource ID conflict).
      • Diagnostic settings: Monitoring > Diagnostic settings > Add > Send "AllMetrics" to Log Analytics > Query: AzureMetrics | where ResourceProvider == "MICROSOFT.CACHE" and MetricName == "CacheMemoryUsed" | summarize avg(average) by bin(TimeGenerated, 5m)—confirms backend activity even if UI lags.
    4. Common Fixes:
      • Cold Start: Perform initial writes/reads (e.g., 10 keys) to trigger metrics.
      • Tier Limits: Basic tier metrics limited (no real-time); upgrade to Standard/Premium for full visibility.
      • Network/VNet: If VNet-integrated, ensure NSG allows port 6380; test from Azure VM in same subnet.
      • Restart: Cache > Restart (5-10 mins downtime)—resets monitoring.

    Test a simple set/get first—metrics should appear within 15 mins. If persists >1 hour, open support ticket (Help > New > Technical > Cache for Redis > "Metrics not updating"). Share tier/size for more specifics.

    Best Regards,

    Jerald Felix


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.