Skip to content

Commit

Permalink
Change default cache separator to be Windows-compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jul 13, 2020
1 parent 0e1d9c4 commit 381708d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Archiver/Handlers/CacheHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function archive(Schema $schema): bool
foreach ($tables as $table)
{
$schema->tables->{$table->name} = true;
$this->cache->save($this->cacheKey . ':' . $table->name, $table, $this->config->ttl);
$this->cache->save($this->cacheKey . '-' . $table->name, $table, $this->config->ttl);
}

// Save the scaffold version of the schema
Expand Down
2 changes: 1 addition & 1 deletion src/Reader/Handlers/CacheHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function fetch($tables)
{
if ($this->tables->$tableName === true)
{
$this->tables->$tableName = $this->cache->get($this->cacheKey . ':' . $tableName);
$this->tables->$tableName = $this->cache->get($this->cacheKey . '-' . $tableName);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Traits/CacheHandlerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ trait CacheHandlerTrait
public function cacheInit(CacheInterface $cache = null)
{
// By default use an enviroment-specific name (helps with testing collisions)
$this->cacheKey = 'schema:' . ENVIRONMENT;
$this->cacheKey = 'schema-' . ENVIRONMENT;

// Use injected cache handler, or get the default from its service
if (is_null($cache))
Expand Down

0 comments on commit 381708d

Please sign in to comment.