R matrix inverse functions using cache

Two R functions one of which gets, sets, gets inverse and sets inverse
of a matrix object in cache and the second one tries to get the inverse
from the cache and if the inverse is not found tries to set the inverse
itself.