Laravel 5.2缓存增量和到期

时间:2016-03-20 18:22:08

标签: php laravel caching

因此,当我设置一个要缓存的值并且我想增加该值时,它会重置过期时间吗?

为了测试它,我将值和到期时间设置为1分钟。然后我每隔一秒使用增量直到1分钟,它没有过期。

如何在不重置过期时间的情况下递增?

Exception in thread "main" java.lang.NoClassDefFoundError: com/pi4j/io/gpio/GpioFactory
        at test.Main.main(Main.java:11)
    Caused by: java.lang.ClassNotFoundException: com.pi4j.io.gpio.GpioFactory
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 1 more

1 个答案:

答案 0 :(得分:0)

如果缓存驱动程序是Redis。代码是有效的

onAutosuggestInputKeyDown = event => {
  if (event.key === 'Enter') {

     // Prevent this event from propagating if enter key pressed
     event.stopPropagation()

     this.onCustomSuggestionCreate(event)
  }

  // If stopPropagation() not called on event, the event will propagate
  // if it has the ability to do so (ie from the element dispatching the 
  // event)
}