<?php

	# mark core  v1.0
    # author Drk in
	# date 24.10.19 

	# class cache config
	
	class cache_config {

		public static function get() # get
		{
		
		$file = cache."_config/data.data";	
		$cache = @file_get_contents($file); 	
		return unserialize($cache);

		}

		public static function save() # save
		{
		
		$file = cache."_config/data.data";	
		$cache = DB :: $dbh -> queryFetch("SELECT * FROM config WHERE id = 1 LIMIT 1");	
		$cache = serialize($cache);	
		@file_put_contents($file, $cache);

		}

		public static function check() # check
		{
			
		$file = cache."_config/data.data";	
		if(!file_exists($file)):  	
		self::save();
		endif;
		return self::get();

		}

	

	}	
?>