NutzCN Logo
问答 在数据库把数据删除了,但是程序还是可以查询出来,应该清理哪里的缓存呢?
发布于 752天前 作者 zozoh44 1069 次浏览 复制 上一个帖子 下一个帖子
标签:
2017-11-24 16:57:05,878 org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:211) DEBUG - SELECT * FROM Sbxxmain  WHERE tbyd=?
    |     1 |
    |-------|
    | 2014年 |
  For example:> "SELECT * FROM Sbxxmain  WHERE tbyd='2014年'"
打印年度数据主表[{
   "id" :210,
   "tdsj" :"2017-3-31",
   "tdbm" :"加工部门",
   "tdr" :"小苏",
   "wjmc" :"省建投上报表(20170331091756).xls",
   "lxdh" :"17131120471",
   "sh" :1,
   "ck" :["26a629b815a543bb9e981d383c7f0ce7"],
   "ny" :false,
   "tbyd" :"2014年",
   "cbzb" :"初报",
   "createTime" :"2017-03-31 09:18:41",
   "createUser" :"superadmin",
   "deleted" :false
}, {
   "id" :284,
   "tdsj" :"2017-11-1",
   "wjmc" :"2014.xls",
   "sh" :1,
   "ck" :["26a629b815a543bb9e981d383c7f0ce7"],
   "ny" :false,
   "tbyd" :"2014年",
   "cbzb" :"初报",
   "shz" :"superadmin",
   "createTime" :"2017-11-06 10:03:38",
   "createUser" :"superadmin",
   "deleted" :false
}]
9 回复

配了daocache?

var ioc = {
cacheManager : {
type : "net.sf.ehcache.CacheManager",
factory : "net.sf.ehcache.CacheManager#getCacheManager",
args : ["tzcglpt"] // 对应shiro.ini中指定的ehcache.xml中定义的name
}
};

配了daocache?

是的,
代码是这个
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"
monitoring="autodetect" dynamicConfig="true" name="tzcglpt">


<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"
monitoring="autodetect" dynamicConfig="true" name="tzcglpt">


这个是ehcache, 贴dao.js看看

<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"
	monitoring="autodetect" dynamicConfig="true" name="tzcglpt">
	<diskStore path="java.io.tmpdir/tzcglpt" />
	<defaultCache maxElementsInMemory="10000" eternal="false"
		timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="false"
		diskPersistent="false" diskExpiryThreadIntervalSeconds="120"
		statistics="true" />
</ehcache>
var ioc = {
		conf : {
			type : "org.nutz.ioc.impl.PropertiesProxy",
			fields : {
				paths : ["config/custom/"]
			}
		},
	    dataSource : {
	        type : "com.alibaba.druid.pool.DruidDataSource",
	        events : {
	        	create : "init",
	            depose : 'close'
	        },
	        fields : {
	            url : {java:"$conf.get('db.url')"},
	            username : {java:"$conf.get('db.username')"},
	            password : {java:"$conf.get('db.password')"},
	            testWhileIdle : true,
	            validationQuery : {java:"$conf.get('db.validationQuery')"},
	            maxActive : {java:"$conf.get('db.maxActive')"},
	            filters : "mergeStat",
	            connectionProperties : "druid.stat.slowSqlMillis=1000",
	        }
	    },
		dao : {
			type : "org.nutz.dao.impl.NutDao",
			args : [{refer:"dataSource"}],
			
		}
		
};

那没有用到daocache, 起码NutDao这一层是没有缓存了

是否使用了其他缓存技术, 例如wkcache, autoloadcache呢?

还有一种可能性,连错数据库或者清除了错误的数据库

添加回复
请先登陆
回到顶部