Home  >  Article  >  Backend Development  >  Webservice中 怎么将一个临时数据保存起来以供后面的链接使用,请各位帮忙

Webservice中 怎么将一个临时数据保存起来以供后面的链接使用,请各位帮忙

WBOY
WBOYOriginal
2016-06-13 13:44:50834browse

Webservice中 如何将一个临时数据保存起来以供后面的链接使用,请各位帮忙!
在我的 webservice中 (用php写的!), 其中 我想将一段数据(1K左右的字符串)保存下来,供以后的链接使用,请问有没有什么方法呢?

PS: 不考虑将数据写入文件或者数据库!!! 理想状态就是在本次开机(或者服务器重启之前)的这段时间内 这段数据都可以用。 也就是说 这段数据也就是在第一个client的第一次连接的时候生成,以后都不用再生成了。

请大家帮帮忙吧~

------解决方案--------------------
共享内存
------解决方案--------------------
还可以考虑浏览器缓存,但要求浏览器不能关闭。关闭可能缓存消失。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn