[Groonga-commit] groonga/gcs [master] Clear chached table names if domain id is changed

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 2日 (木) 12:25:43 JST


SHIMODA Hiroshi	2012-08-02 12:25:43 +0900 (Thu, 02 Aug 2012)

  New Revision: eba9bd52faf9393d1d7823af2acda2d074b01f25
  https://github.com/groonga/gcs/commit/eba9bd52faf9393d1d7823af2acda2d074b01f25

  Log:
    Clear chached table names if domain id is changed

  Modified files:
    lib/database/domain.js

  Modified: lib/database/domain.js (+6 -1)
===================================================================
--- lib/database/domain.js    2012-08-02 12:23:21 +0900 (0666660)
+++ lib/database/domain.js    2012-08-02 12:25:43 +0900 (12b1e19)
@@ -173,7 +173,12 @@ Domain.prototype = {
     return this._id === undefined ? DEFAULT_ID : this._id ;
   },
   set id(value) {
-    return this._id = value;
+    this._id = value;
+    // clear caches
+    delete this._tableName;
+    delete this._termsTableName;
+    delete this._synonymTableName;
+    return value;
   },
 
   get domainId() {
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index