two drunks looking for a friends grave

John Henry Menton’s large eyes stared ahead.

The barrow turned into a side lane. A portly man, ambushed among the grasses, raised his hat in homage. The gravediggers touched their caps.

—John O’Connell, Mr Power said pleased. He never forgets a friend.

Mr O’Connell shook all their hands in silence. Mr Dedalus said:

—I am come to pay you another visit.

—My dear Simon, the caretaker answered in a low voice. I don’t want your custom at all.

Saluting Ned Lambert and John Henry Menton he walked on at Martin Cunningham’s side puzzling two long keys at his back.

—Did you hear that one, he asked them, about Mulcahy from the Coombe?

—I did not, Martin Cunningham said.

They bent their silk hats in concert and Hynes inclined his ear. The caretaker hung his thumbs in the loops of his gold watchchain and spoke in a discreet tone to their vacant smiles.

—They tell the story, he said, that two drunks came out here one foggy evening to look for the grave of a friend of theirs. They asked for Mulcahy from the Coombe and were told where he was buried. After traipsing about in the fog they found the grave sure enough. One of the drunks spelt out the name: Terence Mulcahy. The other drunk was blinking up at a statue of Our Saviour the widow had got put up.

The caretaker blinked up at one of the sepulchres they passed. He resumed:

—And, after blinking up at the sacred figure, Not a bloody bit like the man, says he. That’s not Mulcahy, says he, whoever done it.

Rewarded by smiles he fell back and spoke with Corny Kelleher, accepting the dockets given him, turning them over and scanning them as he walked.

—That’s all done with a purpose, Martin Cunningham explained to Hynes.

—I know, Hynes said. I know that.

—To cheer a fellow up, Martin Cunningham said. It’s pure goodheartedness: damn the thing else.

annotation:

Mr Dedalus obviously seems to be obsessed with mortality. It’s clear from his statement about returning for another visit that he is in the cemetery often, presumably to visit his wife. The caretaker in saying “I don’t want your custom at all” is expressing his sympathy at the loss of Dedalus’s wife, but also seems to be referencing having Dedalus himself as a resident.  

The Caretaker is a clever devise that performs the same function for the reader as he is doing for the characters in the story. Joyce seems to have felt the mood needed to be lightened, thus we get the caretaker’s story / joke.