Skip to content

Commit

Permalink
Merge pull request #114 from KumbiaPHP/dev
Browse files Browse the repository at this point in the history
v 0.5.8
  • Loading branch information
joanhey authored Jun 25, 2021
2 parents de7b4d9 + e40b13c commit bb306ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BaseRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
abstract class BaseRecord
{

public const VERSION = '0.5.7';
public const VERSION = '0.5.8';

/**
* Database por defecto usa default.
Expand Down
5 changes: 3 additions & 2 deletions Metadata/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ private static function getMetadata(string $database, string $table, string $sch
{
$key = "$database.$table.$schema";
//TODO añadir cache propia
if (\PRODUCTION && self::$instances[$key] = \Cache::driver()->get($key, 'ActiveRecord.Metadata')) {

if (\PRODUCTION && self::$instances[$key] = \unserialize(\Cache::driver()->get($key, 'ActiveRecord.Metadata'))) {
return self::$instances[$key];
}

Expand All @@ -110,7 +111,7 @@ private static function getMetadata(string $database, string $table, string $sch
// Cachea los metadatos
if (\PRODUCTION) {
\Cache::driver()->save(
self::$instances[$key],
\serialize(self::$instances[$key]),
\Config::get('config.application.metadata_lifetime'),
$key,
'ActiveRecord.Metadata'
Expand Down

0 comments on commit bb306ee

Please sign in to comment.