Skip to content

feat: Add performance caching system #17

@anjor

Description

@anjor

Feature Request: Performance Caching System

Overview

Implement intelligent caching to improve CLI performance by reducing redundant API calls and storing frequently accessed data locally.

Proposed Implementation

  • Authentication Token Caching: Cache valid tokens to reduce auth overhead
  • API Response Caching: Cache dataset metadata, ontology schemas, user/group info
  • Query Result Caching: Optional caching for expensive SQL query results
  • Smart Cache Invalidation: Time-based and content-based cache expiration
  • Cache Management Commands: pltr cache clear, pltr cache status, pltr cache config

Cache Strategy

  • Location: ~/.cache/pltr/ following XDG standards
  • TTL Defaults:
    • Auth tokens: 30 minutes
    • API responses: 5 minutes
    • Query results: User configurable (default disabled)
  • Size Limits: Configurable max cache size with LRU eviction
  • Security: Sensitive data encryption at rest

Use Cases

  • Repeated Commands: Faster execution of frequently run operations
  • Interactive Shell: Improved responsiveness in pltr shell mode
  • Development Workflows: Faster iteration when working with same datasets
  • Large Result Sets: Optional caching of expensive query results

Technical Requirements

  • Thread-safe cache implementation
  • Configurable cache policies per command type
  • Automatic cleanup of expired entries
  • Optional cache bypass with --no-cache flag
  • Cache statistics and monitoring

Acceptance Criteria

  • Authentication tokens cached and reused within TTL
  • API responses cached with smart invalidation
  • Cache configuration via pltr configure cache
  • Cache management commands functional
  • Significant performance improvement measurable
  • Security audit of cached sensitive data
  • Comprehensive test coverage including cache behavior

Priority: Medium
Labels: enhancement, Phase-8
Effort: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions