<?php

namespace WcJUpsellator\Helpers;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Cacheable
{
    private static $values = [];

    public static function get( $key, $callback )
    {
     
        if( isset( self::$values[ $key ] ) )
        {           
            return self::$values[ $key ];
        } 
        
        self::$values[ $key ] = $callback();        
       
        return  self::$values[ $key ];        
    }
}