<?php

namespace App\Services;

/**
 * Dummy CacheService - No caching, direct database queries
 * This is a temporary placeholder to prevent errors
 * TODO: Remove all CacheService references from controllers
 */
class CacheService
{
    // TTL constants (not used, just for compatibility)
    const TTL_SHORT = 300;
    const TTL_MEDIUM = 1800;
    const TTL_LONG = 3600;

    /**
     * Get all stores (no caching)
     */
    public static function getStores()
    {
        return \App\Models\Store::where('delete_flag', 0)->get();
    }

    /**
     * Get all raw materials (no caching)
     */
    public static function getRawMaterials()
    {
        return \App\Models\RawMaterial::where('delete_flag', 0)->get();
    }

    /**
     * Get all item conversions (no caching)
     */
    public static function getItemConversions()
    {
        return \App\Models\ItemConversion::where('delete_flag', 0)->get();
    }

    /**
     * Remember function (no caching, just execute callback)
     */
    public static function remember($key, $ttl, $callback)
    {
        return $callback();
    }

    /**
     * Clear cache methods (do nothing)
     */
    public static function clearStoreCache($id) { }
    public static function clearRawMaterialCache($id) { }
    public static function clearItemConversionCache($id) { }
    public static function clearStockOpnameCache($storeId) { }
    public static function clearCurrentStockCache($storeId) { }
}
