PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, November 13, 2022

[FIXED] What is the point of replace function in Memcache?

 November 13, 2022     memcached, php     No comments   

Issue

What is the point of replace function in PHP memcache if you can just use set? Even if there is a variable, set automatically replaces it, right?

Can you give me an example where it's better to use replace instead of set?

Thanks.


Solution

According to PHP.net:

Memcached::replace() is similar to Memcached::set(), but the operation fails if the key does not exist on the server.



Answered By - ZoFreX
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing