我已阅读redis config document,但无法找到此选项。
我已经搜索过并发现"默认情况下,密钥只会永远存在"。我想急切地改变这种默认行为。
<section ng-app = "testModule" ng-cotroller="TestController" class="main-content">
<div class="row ">
<div class="col-md-6 col-md-offset-1 list-group" ng-controller="InfoController">
<div class="list-group-item list-group-item-info" ng-show="sel">{{sel}}
</div>
<!--Before click-->
<div class="list-group-item" ng-if="sel == 'List'">Choose one in right!</div>
<!--After click-->
<div class="list-group-item sel-dat" ng-repeat="dat in data track by $index" ng-if="sel != 'List'">
<h4>Name: {{dat.name}}</h4>
</div>
</div>
<div class="col-md-3 col-md-offset-1 list-group aa" ng-controller="OptionController">
<div class="list-group-item">Users</div>
<div class="list-group-item">Kinds</div>
</div>
</div>
</section>
提前致谢!
答案 0 :(得分:3)
Redis不提供此功能 - 您必须为每个键明确设置TTL。请注意,更新密钥会重置其TTL,因此您必须相应地重新设置它。