mirror of
https://github.com/danog/AsyncOrm.git
synced 2024-12-02 09:38:31 +01:00
Cleanup
This commit is contained in:
parent
cc6c6fc341
commit
bca7169b3e
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
a.php
|
||||||
.phpunit.cache
|
.phpunit.cache
|
||||||
/vendor/
|
/vendor/
|
||||||
*.cache
|
*.cache
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
namespace danog\AsyncOrm;
|
namespace danog\AsyncOrm;
|
||||||
|
|
||||||
use danog\AsyncOrm\Annotations\OrmMappedArray;
|
use danog\AsyncOrm\Annotations\OrmMappedArray;
|
||||||
use danog\AsyncOrm\Driver\CachedArray;
|
use danog\AsyncOrm\Internal\Driver\CachedArray;
|
||||||
use danog\AsyncOrm\Settings\DriverSettings;
|
use danog\AsyncOrm\Settings\DriverSettings;
|
||||||
use danog\AsyncOrm\Settings\Mysql;
|
use danog\AsyncOrm\Settings\Mysql;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace danog\AsyncOrm;
|
namespace danog\AsyncOrm;
|
||||||
|
|
||||||
use AssertionError;
|
use AssertionError;
|
||||||
use danog\AsyncOrm\Driver\CachedArray;
|
use danog\AsyncOrm\Internal\Driver\CachedArray;
|
||||||
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
||||||
use danog\AsyncOrm\Serializer\Json;
|
use danog\AsyncOrm\Serializer\Json;
|
||||||
use danog\AsyncOrm\Settings\DriverSettings;
|
use danog\AsyncOrm\Settings\DriverSettings;
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
* @link https://daniil.it/AsyncOrm AsyncOrm documentation
|
* @link https://daniil.it/AsyncOrm AsyncOrm documentation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace danog\AsyncOrm\Driver;
|
namespace danog\AsyncOrm\Internal\Driver;
|
||||||
|
|
||||||
use danog\AsyncOrm\DbArray;
|
use danog\AsyncOrm\DbArray;
|
||||||
use danog\AsyncOrm\FieldConfig;
|
use danog\AsyncOrm\FieldConfig;
|
||||||
use danog\AsyncOrm\Internal\Containers\CacheContainer;
|
use danog\AsyncOrm\Internal\Containers\CacheContainer;
|
||||||
|
use Revolt\EventLoop;
|
||||||
use Traversable;
|
use Traversable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,6 +65,7 @@ final class CachedArray extends DbArray
|
|||||||
public function __destruct()
|
public function __destruct()
|
||||||
{
|
{
|
||||||
$this->cache->stopCacheCleanupLoop();
|
$this->cache->stopCacheCleanupLoop();
|
||||||
|
EventLoop::queue($this->cache->flushCache(...));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function flushCache(): void
|
public function flushCache(): void
|
@ -23,9 +23,9 @@ use Amp\Process\Process;
|
|||||||
use Amp\Redis\RedisConfig;
|
use Amp\Redis\RedisConfig;
|
||||||
use AssertionError;
|
use AssertionError;
|
||||||
use danog\AsyncOrm\DbObject;
|
use danog\AsyncOrm\DbObject;
|
||||||
use danog\AsyncOrm\Driver\CachedArray;
|
|
||||||
use danog\AsyncOrm\Driver\MemoryArray;
|
use danog\AsyncOrm\Driver\MemoryArray;
|
||||||
use danog\AsyncOrm\FieldConfig;
|
use danog\AsyncOrm\FieldConfig;
|
||||||
|
use danog\AsyncOrm\Internal\Driver\CachedArray;
|
||||||
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
use danog\AsyncOrm\Internal\Driver\ObjectArray;
|
||||||
use danog\AsyncOrm\KeyType;
|
use danog\AsyncOrm\KeyType;
|
||||||
use danog\AsyncOrm\Serializer\Igbinary;
|
use danog\AsyncOrm\Serializer\Igbinary;
|
||||||
@ -402,7 +402,7 @@ final class OrmTest extends TestCase
|
|||||||
[ValueType::BOOL, false],
|
[ValueType::BOOL, false],
|
||||||
|
|
||||||
// Uncomment when segfaults are fixed
|
// Uncomment when segfaults are fixed
|
||||||
//[ValueType::OBJECT, new TestObject],
|
[ValueType::OBJECT, new TestObject],
|
||||||
|
|
||||||
[ValueType::SCALAR, 'test'],
|
[ValueType::SCALAR, 'test'],
|
||||||
[ValueType::SCALAR, 123],
|
[ValueType::SCALAR, 123],
|
||||||
|
Loading…
Reference in New Issue
Block a user