How to delete a .txt file after a certain time? [closed]

不问归期 提交于 2019-12-13 09:48:34

问题


I have this .txt file that displays information but I want to delete itself after like 5 minutes or so.


回答1:


Considering what you are doing, won't using memcached be a better option? You just store your ips as key=value pairs in memcached, with an expiry of 5 minutes. Thus your data always expires every 5 minutes. Also interaction with memcached is much easier than file-handling.



来源:https://stackoverflow.com/questions/32173259/how-to-delete-a-txt-file-after-a-certain-time

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!