Redirected from: idempotency
An operation that produces the same results no matter how many times it is performed. For example, a database query that does not change any data in the database is idempotent.
Functions can be designed as idempotent if all that is desired is to ensure a certain operation has been completed. For example, with an idempotent delete function, if a request to delete a file is successfully completed for one program, all subsequent requests to delete that file from other programs would return the same success confirmation message. In a non-idempotent delete function, an error would be returned for the second and subsequent requests indicating that the file was not there.