1
0
Fork 0

more cache invalidation

This commit is contained in:
jsteemann 2017-01-03 14:58:13 +01:00
parent dff5c448e4
commit 118a4a7778
1 changed files with 9 additions and 7 deletions

View File

@ -280,16 +280,18 @@ ArangoCollection.prototype.name = function () {
// //////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.status = function () {
var result;
if (this._status === null) {
if (this._status === null ||
this._status === ArangoCollection.STATUS_UNLOADING ||
this._status === ArangoCollection.STATUS_UNLOADED) {
this._status = null;
this.refresh();
}
// save original status
result = this._status;
var result = this._status;
if (this._status === ArangoCollection.STATUS_UNLOADING) {
if (this._status === ArangoCollection.STATUS_UNLOADING ||
this._status === ArangoCollection.STATUS_UNLOADED) {
// if collection is currently unloading, we must not cache this info
this._status = null;
}
@ -494,11 +496,11 @@ ArangoCollection.prototype.load = function (count) {
// //////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype.unload = function () {
this._status = null;
var requestResult = this._database._connection.PUT(this._baseurl('unload'), '');
this._status = null;
arangosh.checkRequestResult(requestResult);
this._status = null;
};
// //////////////////////////////////////////////////////////////////////////////