#!/bin/bash
# refresh_tokens.sh - Refresh all vault cache tokens
# This script forces a re-sync of the vault cache

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [ -x "${SCRIPT_DIR}/vault-cache.sh" ]; then
    echo "Refreshing vault cache..."
    "${SCRIPT_DIR}/vault-cache.sh" invalidate all
    "${SCRIPT_DIR}/vault-cache.sh" sync
    echo "Cache refreshed"
else
    echo "Error: vault-cache.sh not found"
    exit 1
fi
