我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Laravel Cache。 如果值不存在则递增或放置

Is is possible to replace this line of code with something out of the box.

Cache::has('test') ? \Cache::increment('test') : \Cache::put('test', 1, 60);

So basically, I need to check if test exists in the cache. If yes then increment the value, if not create cache record and set value 1.

近期文章

  • 无法检查MySQL查询是否返回任何内容
  • 知道access_token是用于应用程序文件夹还是完全访问?
  • 无论顺序如何,检查关联的多维数组是否相等
  • Angular Js与mysql php
  • 在PHP MYSQL中将多个文件插入/上载到数据库表中的特定行
  • 在没有sql的记录结果中搜索%LIKE%
  • Symfony2主机匹配的路由也匹配其他路由
  • Fullcalendar wordpress提交预订
  • 使用codeigniter分页
  • 如何在php mysql中使用mvc框架创建表单?
  • 安装ext-zmq用于棘轮推动集成
  • 如何使用php和angularjs从模态中检索发布数据
  • 我得到500(内部服务器错误),但仍显示json结果,为什么?
  • Symfony2 - Utf-8 slu in in url
  • 如何通过网络使用智能卡和智能卡读卡器实现双因素身份验证
  • XAMPP如何允许来自同一用户/浏览器但不同选项卡的同时PHP查询?
  • 从一个字符串创建一个数组,该字符串具有多个特定字符串PHP
  • Google Search Console API(PHP) - 授权一天然后第二天我收到“无效凭据”错误
  • 向PHP.INI添加多个扩展
  • HTML表单适用于桌面但不适用于移动设备

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华